File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 22// We've experienced a regression where the module loader stats a bunch of
33// directories on require() even if it's been called before. The require()
44// should caching the request.
5- const common = require ( '../common' ) ;
5+ require ( '../common' ) ;
66const fs = require ( 'fs' ) ;
77const assert = require ( 'assert' ) ;
8+ const { fixturesDir } = require ( '../common/fixtures' ) ;
89
910let counter = 0 ;
1011
@@ -25,7 +26,7 @@ fs.stat = function() {
2526} ;
2627
2728// Load the module 'a' and 'http' once. It should become cached.
28- require ( `${ common . fixturesDir } /a` ) ;
29+ require ( `${ fixturesDir } /a` ) ;
2930require ( '../fixtures/a.js' ) ;
3031require ( './../fixtures/a.js' ) ;
3132require ( 'http' ) ;
@@ -36,7 +37,7 @@ const counterBefore = counter;
3637// Now load the module a bunch of times with equivalent paths.
3738// stat should not be called.
3839for ( let i = 0 ; i < 100 ; i ++ ) {
39- require ( `${ common . fixturesDir } /a` ) ;
40+ require ( `${ fixturesDir } /a` ) ;
4041 require ( '../fixtures/a.js' ) ;
4142 require ( './../fixtures/a.js' ) ;
4243}
You can’t perform that action at this time.
0 commit comments