phantom-unit

1.0.1 • Public • Published

phantom-unit Build Status

Test Scripts Written in PhantomJS

Getting Started

Install the module with: npm install phantom-unit

var phantom_unit = require('phantom-unit');
phantom_unit.test( "filepath" );

Documentation

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 )

Examples

For an example, look at this test

Contributing

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.

Release History

(Nothing yet)

License

Copyright (c) 2013 Jeffrey Lembeck
Licensed under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i phantom-unit

Weekly Downloads

1

Version

1.0.1

License

none

Last publish

Collaborators

  • jlembeck