mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
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:
committed by
Ryan Dahl
parent
6c94b8e4e4
commit
211e82e8d9
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user