I have set up JavaScript unit testing with JS Test Driver on Netbeans as per this Link. However, unlike the results in that tutorial, no more tests are executed after an assertion fails. How can I change this behaviour?
For example, given this test file:
The test.js
file:
AssertionsTestCase = TestCase("AssertionsTestCase");
AssertionsTestCase.prototype.testAlwaysPass = function(){
assertEquals(1, 1);
assertEquals(2, 2);
};
AssertionsTestCase.prototype.testAlwaysFail1 = function(){
assertEquals(1, 2);
};
AssertionsTestCase.prototype.testAlwaysFail2 = function(){
assertEquals(3, 4);
};
the progress bar shows 50%, (2 tests), it should say 33%.
The jsTestDriver.conf
file:
server: http://localhost:42442
load:
- test/lib/jasmine/jasmine.js
- test/lib/jasmine-jstd-adapter/JasmineAdapter.js
- test/unit/*.js
I can have all tests run by command line. (On Windows PowerShell). Running as follows, tests do not stop running after a failure:
java -jar $env:JSTD\JsTestDriver-1.3.5.jar --tests all --config jsTestDriver.conf
the jsTestDriver.conf
file:
server: http://localhost:4244
load:
- test/lib/jasmine/jasmine.js
- test/lib/jasmine-jstd-adapter/JasmineAdapter.js
- test/unit/*.js
All three tests are run.