A Grunt plugin for executing Jasmine unit tests inside PhantomJS.
Includes shims for Function.prototype.bind and Blob.
npm install grunt-phantasmine
The list of Jasmine test runner HTML file(s). Required.
If true, all
console.err log messages are not suppressed. Optional.
If true, all
console.log messages are displayed. Optional.
If you have a script you wish to run on the PhantomJS page(s) you can specify them here. Useful for adding additional shims or custom reporters for Jasmine. Please note: the path of this file could either be an absolute path, or relative to your Gruntfile.js. Optional.
In case there is an unresponsive script on your page, then PhantomJS will force quit after this time (in milliseconds) if specified. Optional. Defaults to 30 seconds.
The PhantomJS process will exit with one the following known exit codes:
0: All tests passed
1: No test runner file was specified
2: Error while loading the test runner file
3: One or more tests failed
4: The tests took too long to execute and timed out within the specified limit
If it exits with any other code it probably means there was an error beyond the scope of this plugin, e.g., OS-level.
Running "phantasmine:files" (phantasmine) task Executing Jasmine test runner: "../tests/specs.html"... Total passed: 429 Total failed: 0
- The jQuery function $.html() does not work too well with SVGs in PhantomJS hence any tests using this might break despite them working fine on other major browsers; in such cases, use $.text() for better results.
This file was generated on Sun Apr 03 2016 10:23:54 GMT+0530 (IST)