mercredi 25 février 2015

Prepare static HTML files for jasmine-html-runner with grunt

I use grunt and usemin to manage my single app application (one HTML file with lots of JavaScript). The app talks via Ajax to a backend, so currently I use webdriver to test my app and the integration with the backend.


I also would like to run some frontend only tests while mocking out the backend. I have some background on jasmine, so my sollution would be to run them with the jasmine-html-runner.


Usemin is nice to prepare my HTML-Application-File for distribution, is there a grunt job that can do something similar for preparing to run tests with jasmine? I need something that copies my index.html and source files to a folder called test and then includes the test files in the head block of the index.html in the test folder (like usemin does it with the minified stuff in the dist folder).


Anyone has some other ideas how I can run jasmine tests on a single app application?


Thanks in advance!


Aucun commentaire:

Enregistrer un commentaire