There was an error while loading. Please reload this page.
1 parent 5521da2 commit d3102e1Copy full SHA for d3102e1
test/es-module/test-esm-repl-imports.js
@@ -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