mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
cdebd32461
PR-URL: https://github.com/nodejs/node/pull/29437 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: David Carlier <devnexen@gmail.com>
20 lines
387 B
JavaScript
20 lines
387 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const { spawn } = require('child_process');
|
|
|
|
const child = spawn(process.execPath, [
|
|
'--experimental-modules',
|
|
'--interactive'
|
|
]);
|
|
child.stdin.end(`
|
|
import('fs').then(
|
|
ns => ns.default === require('fs') ? 0 : 1,
|
|
_ => 2
|
|
).then(process.exit)
|
|
`);
|
|
|
|
child.on('exit', (code) => {
|
|
assert.strictEqual(code, 0);
|
|
});
|