mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
PR-URL: https://github.com/nodejs/node/pull/59964 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
18 lines
456 B
JavaScript
18 lines
456 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { startNewREPLServer } = require('../common/repl');
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const { output, input } = startNewREPLServer();
|
|
|
|
output.accumulator = '';
|
|
|
|
// Input without '\n' triggering actual run.
|
|
const inputStr = 'while (true) {}';
|
|
input.emit('data', inputStr);
|
|
// No preview available when timed out.
|
|
assert.strictEqual(output.accumulator, inputStr);
|