Skip to content

jefflembeck/phantom-unit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A way to test your PhantomJS scripts with unit tests.

Resources

License

Stars

Watchers

Forks

Packages

No packages published