From 211e82e8d9b2bcd0b054412b60d25d228a65ca41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Geisend=C3=B6rfer?= Date: Thu, 7 Jan 2010 11:50:28 +0100 Subject: [PATCH] Simple test case for require.async() This is to make sure this doesn't break after implementing the new truly sync require() function. --- test/mjsunit/test-module-loading.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/mjsunit/test-module-loading.js b/test/mjsunit/test-module-loading.js index f91958f8b..3a042fce6 100644 --- a/test/mjsunit/test-module-loading.js +++ b/test/mjsunit/test-module-loading.js @@ -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());