Created
March 28, 2011 12:28
-
-
Save sugyan/890382 to your computer and use it in GitHub Desktop.
This file contains 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 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.js'); | |
QUnit.test('hoge', function() { | |
setTimeout(function() { | |
assert.ok(1); | |
}, 100); | |
}); | |
QUnit.start(); |
This file contains 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 npm@0.3.17 | |
npm info using node@v0.4.4 | |
qunit-tap@1.0.0 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