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.
10 lines
348 B
10 lines
348 B
9 years ago
|
// Flags: --expose_internals
|
||
|
'use strict';
|
||
|
const assert = require('assert');
|
||
|
const internalModule = require('internal/module');
|
||
|
|
||
|
exports.requireDepth = internalModule.requireDepth;
|
||
|
assert.strictEqual(internalModule.requireDepth, 2);
|
||
|
assert.deepStrictEqual(require('./one'), { requireDepth: 1 });
|
||
|
assert.strictEqual(internalModule.requireDepth, 2);
|