mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
585 B
14 lines
585 B
9 years ago
|
// Flags: --expose_internals
|
||
|
'use strict';
|
||
|
const common = require('../common');
|
||
|
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');
|
||
|
assert.deepStrictEqual(one, { requireDepth: 1 });
|
||
|
assert.deepStrictEqual(two, { requireDepth: 2 });
|
||
|
assert.strictEqual(internalModule.requireDepth, 0);
|