0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/test/mjsunit/test-module-loading.js

42 lines
934 B
JavaScript
Raw Normal View History

node.debug("load test-module-loading.js");
include("common.js");
var a = require("fixtures/a.js");
var d = require("fixtures/b/d.js");
var d2 = require("fixtures/b/d.js");
2009-08-26 18:22:00 +02:00
assertFalse(false, "testing the test program.");
2009-08-26 18:22:00 +02:00
assertInstanceof(a.A, Function);
assertEquals("A", a.A());
2009-08-26 18:22:00 +02:00
assertInstanceof(a.C, Function);
assertEquals("C", a.C());
2009-08-26 18:22:00 +02:00
assertInstanceof(a.D, Function);
assertEquals("D", a.D());
2009-08-26 18:22:00 +02:00
assertInstanceof(d.D, Function);
assertEquals("D", d.D());
2009-08-26 18:22:00 +02:00
assertInstanceof(d2.D, Function);
assertEquals("D", d2.D());
process.addListener("exit", function () {
assertInstanceof(a.A, Function);
assertEquals("A done", a.A());
assertInstanceof(a.C, Function);
assertEquals("C done", a.C());
assertInstanceof(a.D, Function);
assertEquals("D done", a.D());
assertInstanceof(d.D, Function);
assertEquals("D done", d.D());
assertInstanceof(d2.D, Function);
assertEquals("D done", d2.D());
puts("exit");
});