Created
August 1, 2011 22:17
-
-
Save aperiodic/1119130 to your computer and use it in GitHub Desktop.
Vows Asynchronous Export Error
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
var assert = require('assert'); | |
var exec = require('child_process').exec; | |
var vows = require('vows'); | |
var exportTests = function () { | |
var batch = { | |
'When the tests are exported asynchronously': { | |
topic: function () { return 42; }, | |
'they actually run': function (val) { assert.equal(val, 42); } | |
} | |
}; | |
// export the tests | |
vows.describe('readability').addBatch(batch).export(module); | |
} | |
exec('sleep 1', function (err, stdout, stderr) { | |
if (err) throw(err); | |
exportTests(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If run by node (i.e.,
node asyncExport.js
), then the tests run normally. If run by vows, then the vows runner complains that it cannot find any tests.