Simple test case for require.async()

This is to make sure this doesn't break after implementing the new
truly sync require() function.
This commit is contained in:
Felix Geisendörfer
2010-01-07 11:50:28 +01:00
committed by Ryan Dahl
parent 6c94b8e4e4
commit 211e82e8d9

View File

@@ -57,6 +57,14 @@ try {
assert.equal(require('path').dirname(__filename), __dirname);
require.async('./fixtures/a')
.addCallback(function(a) {
assert.equal("A", a.A());
})
.addErrback(function() {
assert.ok(false, 'async loading broken?');
});
process.addListener("exit", function () {
assert.equal(true, a.A instanceof Function);
assert.equal("A done", a.A());