Add a task to run the tests once with PhantomJS

The test.js task starts the development server and runs the tests in PhantomJS.  As mentioned in the readme, when running the tests continuously during development, it is more convenient to start the dev server and visit the root of the test directory in your browser.

Later we can bring in Karma to drive PhantomJS and other browsers, but this simple "run once" task is useful for the CI job.
This commit is contained in:
Tim Schaub
2014-07-05 19:34:17 -04:00
parent 297503e7c9
commit b452e04e08
6 changed files with 156 additions and 59 deletions
+5
View File
@@ -104,3 +104,8 @@ Called after install to generate an example index. After new examples are added
Run a debug server that provides all library sources unminified. Provides a static server for examples and tests. See the `--help` option for more detail.
node tasks/serve.js --help
## `test.js`
Run the tests once in a headless browser. Note that you can also run the tests by running the `serve.js` task and then visiting the root of the test directory in your browser.