From 683e48cb55139e67fea98bab8392228228b5805c Mon Sep 17 00:00:00 2001 From: creisle Date: Fri, 6 Oct 2017 10:06:52 -0700 Subject: [PATCH] test: changed fixtures require PR-URL: https://github.com/nodejs/node/pull/15899 Reviewed-By: Daijiro Wachi Reviewed-By: Ruben Bridgewater --- test/sequential/test-require-cache-without-stat.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/sequential/test-require-cache-without-stat.js b/test/sequential/test-require-cache-without-stat.js index c22fb2afdf003c..021c86ccee0e25 100644 --- a/test/sequential/test-require-cache-without-stat.js +++ b/test/sequential/test-require-cache-without-stat.js @@ -2,9 +2,10 @@ // We've experienced a regression where the module loader stats a bunch of // directories on require() even if it's been called before. The require() // should caching the request. -const common = require('../common'); +require('../common'); const fs = require('fs'); const assert = require('assert'); +const { fixturesDir } = require('../common/fixtures'); let counter = 0; @@ -25,7 +26,7 @@ fs.stat = function() { }; // Load the module 'a' and 'http' once. It should become cached. -require(`${common.fixturesDir}/a`); +require(`${fixturesDir}/a`); require('../fixtures/a.js'); require('./../fixtures/a.js'); require('http'); @@ -36,7 +37,7 @@ const counterBefore = counter; // Now load the module a bunch of times with equivalent paths. // stat should not be called. for (let i = 0; i < 100; i++) { - require(`${common.fixturesDir}/a`); + require(`${fixturesDir}/a`); require('../fixtures/a.js'); require('./../fixtures/a.js'); }