Skip to content

Commit f32ca7c

Browse files
committed
test: add test for repl subpath imports
1 parent e6470c8 commit f32ca7c

File tree

1 file changed

+20
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)