Questions tagged «js-test-driver»

1
断言失败后,NetBeans上的JsTestDriver停止测试
我已经按照此Link在Netbeans上使用JS Test Driver设置了JavaScript单元测试。但是,与该教程中的结果不同,断言失败后将不再执行任何测试。我该如何改变这种行为? 例如,给定此测试文件: 该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-测试所有--config jsTestDriver.conf 该jsTestDriver.conf文件中: server: …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.