Я настроил модульное тестирование JavaScript с помощью JS Test Driver для Netbeans согласно этой ссылке. Однако, в отличие от результатов этого учебника, после проверки не выполняется больше тестов. Как я могу изменить это поведение?
Например, для данного тестового файла:
Файл test.js
:
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);
};
индикатор выполнения показывает 50%, (2 теста), это должно сказать 33%.
Файл jsTestDriver.conf
:
server: http://localhost:42442
load:
- test/lib/jasmine/jasmine.js
- test/lib/jasmine-jstd-adapter/JasmineAdapter.js
- test/unit/*.js
Я могу запустить все тесты из командной строки. (В Windows PowerShell). При выполнении следующих тестов тесты не прекращаются после сбоя:
java -jar $env:JSTD\JsTestDriver-1.3.5.jar --tests all --config jsTestDriver.conf
файл jsTestDriver.conf
:
server: http://localhost:4244
load:
- test/lib/jasmine/jasmine.js
- test/lib/jasmine-jstd-adapter/JasmineAdapter.js
- test/unit/*.js
Все три теста запущены.