mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
PR-URL: https://github.com/nodejs/node/pull/59964 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
22 lines
574 B
JavaScript
22 lines
574 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const { startNewREPLServer } = require('../common/repl');
|
|
const assert = require('node:assert');
|
|
|
|
const tmpdir = require('../common/tmpdir');
|
|
tmpdir.refresh();
|
|
|
|
// Tests that an appropriate error is displayed if .load is called without a filename
|
|
|
|
const { replServer, input, output } = startNewREPLServer({ terminal: false });
|
|
|
|
output.write = common.mustCall(function(data) {
|
|
assert.strictEqual(data, 'The "file" argument must be specified\n');
|
|
output.write = () => {};
|
|
});
|
|
|
|
input.run(['.load']);
|
|
|
|
replServer.close();
|