Skip to content

Commit 6590118

Browse files
committed
test: add test for repl subpath imports
1 parent 383bbf7 commit 6590118

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'use strict';
2+
const { mustCall } = require('../common');
3+
const assert = require('assert');
4+
const fixtures = require('../common/fixtures');
5+
const { spawn } = require('child_process');
6+
7+
const child = spawn(process.execPath, [
8+
'--interactive',
9+
], {
10+
cwd: fixtures.path('es-modules', 'pkgimports'),
11+
});
12+
13+
child.stdin.end(
14+
'try{require("#test");await import("#test")}catch{process.exit(-1)}'
15+
);
16+
17+
child.on('exit', mustCall((code) => {
18+
assert.strictEqual(code, 0);
19+
}));

0 commit comments

Comments
 (0)