-
Notifications
You must be signed in to change notification settings - Fork 28.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module: 12.x self resolve flag as experimental modules
- Loading branch information
1 parent
888f8ff
commit 052e1a9
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
require('../common'); | ||
const assert = require('assert'); | ||
const path = require('path'); | ||
const { createRequireFromPath } = require('module'); | ||
|
||
const fixturesRequire = | ||
createRequireFromPath(path.resolve(__dirname, '../fixtures/_')); | ||
|
||
try { | ||
fixturesRequire('pkgexports/resolve-self'); | ||
assert(false); | ||
} catch (e) { | ||
assert.strictEqual(e.code, 'MODULE_NOT_FOUND'); | ||
} |