mirror of
https://github.com/nodejs/node.git
synced 2025-05-11 05:03:38 +00:00

common.js contains code that checks for variables leaking into the global namespace. Load common.js in all tests that do not intentionally leak variables. PR-URL: https://github.com/nodejs/node/pull/3095 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
24 lines
471 B
JavaScript
24 lines
471 B
JavaScript
'use strict';
|
|
require('../common');
|
|
var assert = require('assert');
|
|
var readline = require('readline');
|
|
|
|
var rl = readline.createInterface(process.stdin, process.stdout);
|
|
rl.resume();
|
|
|
|
var hasPaused = false;
|
|
|
|
var origPause = rl.pause;
|
|
rl.pause = function() {
|
|
hasPaused = true;
|
|
origPause.apply(this, arguments);
|
|
};
|
|
|
|
var origSetRawMode = rl._setRawMode;
|
|
rl._setRawMode = function(mode) {
|
|
assert.ok(hasPaused);
|
|
origSetRawMode.apply(this, arguments);
|
|
};
|
|
|
|
rl.close();
|