Test Scripts Written in PhantomJS
Install the module with: npm install phantom-unit
var phantom_unit = require('phantom-unit');
phantom_unit.test( "filepath" );
phantom-unit is a wrapper around a phantomjs script that borrows syntax from node-unit so you can write tests that work in the phantom runtime.
Current Functionality:
- test.ok( value, message )
- test.equal( actual, expected, message )
- test.notEqual( actual, expected, message )
- test.throws( codeblock, Error Expected, message )
- test.doesNotThrow( codeblock, message )
For an example, look at this test
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
(Nothing yet)
Copyright (c) 2013 Jeffrey Lembeck
Licensed under the MIT license.