unit testing - '2 of 3 tests passed' when only 2 test methods were exported -
unit testing - '2 of 3 tests passed' when only 2 test methods were exported -
this test-main.js
, default after running cfx init
..
var main = require("./main"); exports["test main"] = function(assert) { assert.pass("unit test running!"); }; exports["test main async"] = function(assert, done) { assert.pass("async unit test running!"); done(); }; require("sdk/test").run(exports);
and output, why 2 of 3 tests passed
? when there 2 test methods exported.
[rob@laptop addon]$ ~/apps/addon-sdk-1.17/bin/cfx test using binary @ '/usr/bin/firefox'. using profile @ '/tmp/tmpdrqavv.mozrunner'. running tests on firefox 31.1.0/gecko 31.1.0 ({ec8030f7-c20a-464f-9b0e-13a3a9e97384}) under linux/x86_64. console.warn: addon: plural form unknown locale "null" scheme js : error chrome://browser/content/browser.js:14338 - typeerror: value not non-null object scheme js : error chrome://browser/content/content-sessionstore.js:230 - typeerror: docshell.queryinterface(...).sessionhistory null console.error: addon: warnings and/or errors logged. 2 of 3 tests passed. total time: 3.634853 seconds programme terminated unsuccessfully.
unit-testing firefox-addon-sdk
Comments
Post a Comment