-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module: also enable subpath imports in REPL
PR-URL: #43450 Fixes: #43410 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
- Loading branch information
Showing
2 changed files
with
32 additions
and
14 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,19 @@ | ||
'use strict'; | ||
const { mustCall } = require('../common'); | ||
const assert = require('assert'); | ||
const fixtures = require('../common/fixtures'); | ||
const { spawn } = require('child_process'); | ||
|
||
const child = spawn(process.execPath, [ | ||
'--interactive', | ||
], { | ||
cwd: fixtures.path('es-modules', 'pkgimports'), | ||
}); | ||
|
||
child.stdin.end( | ||
'try{require("#test");await import("#test")}catch{process.exit(-1)}' | ||
); | ||
|
||
child.on('exit', mustCall((code) => { | ||
assert.strictEqual(code, 0); | ||
})); |