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.

16 lines
540 B

'use strict';
require('../common');
const assert = require('assert');
const _module = require('module'); // avoid collision with global.module
const lookupResults = _module._resolveLookupPaths('./lodash');
let paths = lookupResults[1];
assert.strictEqual(paths[0], '.',
'Current directory gets highest priority for local modules');
paths = _module._resolveLookupPaths('./lodash', null, true);
assert.strictEqual(paths && paths[0], '.',
'Current directory gets highest priority for local modules');