node/test/mjsunit/test-delayed-require.js

12 lines
215 B
JavaScript

include("common.js");
setTimeout(function () {
a = require("fixtures/a.js");
}, 50);
process.addListener("exit", function () {
assertTrue("A" in a);
assertEquals("A", a.A());
assertEquals("D", a.D());
});