mirror of
https://github.com/nodejs/node.git
synced 2025-04-29 14:25:18 +00:00

This switches "Thrown:" with "Uncaught" to outline clearer that the thrown error is not caught. PR-URL: https://github.com/nodejs/node/pull/29676 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
25 lines
541 B
JavaScript
25 lines
541 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const repl = require('repl');
|
|
const assert = require('assert');
|
|
const Stream = require('stream');
|
|
|
|
const output = new Stream();
|
|
let text = '';
|
|
output.write = output.pause = output.resume = function(buf) {
|
|
text += buf.toString();
|
|
};
|
|
|
|
const replserver = repl.start({
|
|
output: output,
|
|
input: process.stdin
|
|
});
|
|
|
|
replserver.emit('line', 'process.nextTick(() => { throw null; })');
|
|
replserver.emit('line', '.exit');
|
|
|
|
setTimeout(() => {
|
|
console.log(text);
|
|
assert(text.includes('Uncaught null'));
|
|
}, 0);
|