forked from benjaminplee/QUnit-CLI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
38 lines (25 loc) · 1.42 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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.