I tried to start with unit testing under Firefox Addon SDK 1.14 with Firefox 25.
Referring to https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/unit-testing.html I hoped that my test would print something to the console.
const {DateFormatter, NumberFormatter} = require("./formatter");
exports['test NumberFormatter'] = function (assert) {
assert.pass('Unit test running!');
assert.ok(NumberFormatter.format !== null, 'NumberFormatter available');
};
exports["test NumberFormatter async"] = function (assert, done) {
assert.pass("async Unit test running!");
done();
};
require("sdk/test").run(exports);
The result is:
(d:\Nabor\Entwicklung\2013\addon-sdk) d:\Nabor\Entwicklung\2013\skynet\packages\formatter>cfx test
Using binary at 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'.
Using profile at 'c:\temp\nabor\tmptzmpba.mozrunner'.
Running tests on Firefox 25.0/Gecko 25.0 ({ec8030f7-c20a-464f-9b0e-13a3a9e97384}) under winnt/x86-msvc.
...
3 of 3 tests passed.
Total time: 1.588000 seconds
Program terminated successfully.
I miss the informations from the example?
What is wrong?
Guessing: missing --verbose flag
cfx --verbose test