-
-
Save twada/890507 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports = module.exports = global; | |
var path = require('path'); | |
QUnit = require(path.join(path.dirname(require.resolve('qunit-tap')), '..', 'vendor', 'qunit', 'qunit', 'qunit')).QUnit; | |
require("qunit-tap").qunitTap(QUnit, require("sys").puts, { noPlan: true }); | |
QUnit.init(); | |
QUnit.config.updateRate = 0; | |
exports.assert = QUnit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("../test_helper"); | |
QUnit.module('Async Test Example'); | |
QUnit.test('stop - start combo' , function() { | |
QUnit.stop(200); | |
setTimeout(function() { | |
assert.ok(true); | |
QUnit.start(); | |
}, 100); | |
}); | |
QUnit.asyncTest('asyncTest' , function() { | |
setTimeout(function() { | |
assert.ok(true); | |
QUnit.start(); | |
}, 100); | |
}); | |
QUnit.start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm ls installed qunit-tap | |
npm info it worked if it ends with ok | |
npm info using [email protected] | |
npm info using [email protected] | |
[email protected] active installed A TAP Output Producer Plugin for QUnit TDD QUnit test tests testing TAP | |
npm ok | |
$ prove --ext=.js --exec=node | |
t/hoge.js .. skipped: (no reason given) | |
Test Summary Report | |
------------------- | |
t/hoge.js (Wstat: 0 Tests: 1 Failed: 1) | |
Failed test: 1 | |
Parse errors: Bad plan. You planned 0 tests but ran 1. | |
Files=1, Tests=1, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.06 cusr 0.01 csys = 0.09 CPU) | |
Result: FAIL | |
$ node t/hoge.js | |
# test: hoge | |
1..0 | |
ok 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment