Skip to content

Commit

Permalink
test: replace common.fixturesDir w/common.fixtures
Browse files Browse the repository at this point in the history
PR-URL: #15853
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
jwalton authored and targos committed Oct 18, 2017
1 parent 7337a40 commit 270dd22
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/parallel/test-module-require-depth.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// Flags: --expose_internals
'use strict';
const common = require('../common');
require('../common');
const fixtures = require('../common/fixtures');
const assert = require('assert');
const internalModule = require('internal/module');

// Module one loads two too so the expected depth for two is, well, two.
assert.strictEqual(internalModule.requireDepth, 0);
const one = require(`${common.fixturesDir}/module-require-depth/one`);
const two = require(`${common.fixturesDir}/module-require-depth/two`);
const one = require(fixtures.path('module-require-depth', 'one'));
const two = require(fixtures.path('module-require-depth', 'two'));
assert.deepStrictEqual(one, { requireDepth: 1 });
assert.deepStrictEqual(two, { requireDepth: 2 });
assert.strictEqual(internalModule.requireDepth, 0);

0 comments on commit 270dd22

Please sign in to comment.