Skip to content

Instantly share code, notes, and snippets.

@sugyan
Created March 28, 2011 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sugyan/890382 to your computer and use it in GitHub Desktop.
Save sugyan/890382 to your computer and use it in GitHub Desktop.
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;
require('../test_helper.js');
QUnit.test('hoge', function() {
setTimeout(function() {
assert.ok(1);
}, 100);
});
QUnit.start();
$ 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