Skip to content

barreverte/QUnit-CLI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QUnit-CLI

Forked from https://github.com/benjaminplee/QUnit-CLI

Example extensions for running javascript tests from the command line

Examples and extensions assume use of a standalone JavaScript interpeter such as Mozilla Rhino.  QUnit.js is now downloaded as a submodule (tracking the benjaminplee qunit fork).

To download and run the sample test suite using Mozilla Rhino ...

1) git clone git://github.com/barreverte/QUnit-CLI.git qunit-cli
2) setup rhino as described here: http://twoguysarguing.wordpress.com/2010/11/02/make-javascript-tests-part-of-your-build-qunit-rhino/
3) run "js test/suite.js"


For more information check out the post from benjaminplee tagged with qunit-cli: http://en.wordpress.com/tag/qunit-cli/

For using qunit-cli in a project structure like this one : 

-- src
    |-- main
    |   `-- js
    |       `-- myJavascriptModule.js
    `-- test
        `-- js
            |-- qunit-cli
            |   |-- qunit-cli.js
            |   `-- qunit.js
            |-- suite.js
            `-- testMyJavascriptModule.js

move or copy the quniti-cli directory under test/js.

Then make a suite.js loading the qunit-cli js resource and the source code of your module. 

Then you can run your tests with rhino : java -jar js.jar suite.js in the test/js directory.

The qunit-cli.js (comming from suite.js in the original QUnit-CLI project) has been modified to return a non 0 value (1) for continuous integration scripting.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%