File tree 1 file changed +4
-3
lines changed 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 23
23
// We've experienced a regression where the module loader stats a bunch of
24
24
// directories on require() even if it's been called before. The require()
25
25
// should caching the request.
26
- const common = require ( '../common' ) ;
26
+ require ( '../common' ) ;
27
27
const fs = require ( 'fs' ) ;
28
28
const assert = require ( 'assert' ) ;
29
+ const { fixturesDir } = require ( '../common/fixtures' ) ;
29
30
30
31
let counter = 0 ;
31
32
@@ -46,7 +47,7 @@ fs.stat = function() {
46
47
} ;
47
48
48
49
// Load the module 'a' and 'http' once. It should become cached.
49
- require ( `${ common . fixturesDir } /a` ) ;
50
+ require ( `${ fixturesDir } /a` ) ;
50
51
require ( '../fixtures/a.js' ) ;
51
52
require ( './../fixtures/a.js' ) ;
52
53
require ( 'http' ) ;
@@ -57,7 +58,7 @@ const counterBefore = counter;
57
58
// Now load the module a bunch of times with equivalent paths.
58
59
// stat should not be called.
59
60
for ( let i = 0 ; i < 100 ; i ++ ) {
60
- require ( `${ common . fixturesDir } /a` ) ;
61
+ require ( `${ fixturesDir } /a` ) ;
61
62
require ( '../fixtures/a.js' ) ;
62
63
require ( './../fixtures/a.js' ) ;
63
64
}
You can’t perform that action at this time.
0 commit comments