1 parent f35773a commit c3b0d13Copy full SHA for c3b0d13
1 file changed
test/simple/test-require-cache-without-stat.js
@@ -23,10 +23,11 @@ fs.stat = function() {
23
return _stat.apply(this, arguments);
24
};
25
26
-// Load the module a.js once. It should become cached.
+// Load the module 'a' and 'http' once. It should become cached.
27
28
-var m = common.fixturesDir + '/a.js';
+var m = common.fixturesDir + '/a';
29
require(m);
30
+require('http');
31
32
console.log("counterBefore = %d", counter);
33
var counterBefore = counter;
@@ -37,6 +38,11 @@ for (var i = 0; i < 100; i++) {
37
38
39
}
40
41
+// Do the same with a built-in module
42
+for (var i = 0; i < 100; i++) {
43
+ require('http');
44
+}
45
+
46
console.log("counterAfter = %d", counter);
47
var counterAfter = counter;
48
0 commit comments