PR-URL: https://github.com/nodejs/node/pull/58283 Fixes: https://github.com/nodejs/node/issues/57678 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
19 lines
423 B
JavaScript
19 lines
423 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const cp = require('child_process');
|
|
|
|
const child = cp.spawn(process.execPath, ['--interactive']);
|
|
|
|
let output = '';
|
|
child.stdout.on('data', (data) => {
|
|
output += data;
|
|
});
|
|
|
|
child.on('exit', common.mustCall(() => {
|
|
assert.doesNotMatch(output, /Uncaught Error/);
|
|
}));
|
|
|
|
child.stdin.write('await null;\n');
|
|
child.stdin.write('.exit\n');
|