Skip to content

Commit c9cf788

Browse files
committed
test: add test for repl subpath imports
1 parent 5521da2 commit c9cf788

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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('try{require("#test");await import("#test")}catch{process.exit(-1)}');
14+
15+
child.on('exit', mustCall(code => {
16+
assert.strictEqual(code, 0);
17+
}));

0 commit comments

Comments
 (0)