blob: e66fcb1621adc5bd6bf4daca20a0b3fef600e78f [file] [log] [blame]
Roman Reissf29762f2015-05-19 11:00:061'use strict';
Nathan Rajlich0285dae2012-08-24 20:18:192var common = require('../common'),
3 assert = require('assert'),
4 Stream = require('stream'),
5 repl = require('repl');
6
7// create a dummy stream that does nothing
8var stream = new Stream();
Roman Reissf29762f2015-05-19 11:00:069stream.write = stream.pause = stream.resume = function() {};
Nathan Rajlich0285dae2012-08-24 20:18:1910stream.readable = stream.writable = true;
11
12var r = repl.start({
13 input: stream,
14 output: stream,
15 useGlobal: false
16});
17
18
19// ensure that the repl context gets its own "console" instance
20assert(r.context.console);
21
22// ensure that the repl console instance is not the global one
23assert.notStrictEqual(r.context.console, console);