Skip to content

Commit

Permalink
test: add test for repl subpath imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rayw000 committed Jun 17, 2022
1 parent e6470c8 commit 1eef742
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/es-module/test-esm-repl-imports.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use strict';
require('../common');
const assert = require('assert');
const { spawn } = require('child_process');

const child = spawn(process.execPath, [
'--interactive',
], {
cwd: __dirname + '/../fixtures/es-modules/pkgimports',
});

child.stdin.end(`
try { require('#test'); process.exit(0); }
catch (e) { process.exit(-1); }
`);

child.on('exit', (code) => {
assert.strictEqual(code, 0);
});

0 comments on commit 1eef742

Please sign in to comment.