mirror of
https://github.com/nodejs/node.git
synced 2025-05-21 08:57:07 +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>
21 lines
480 B
JavaScript
21 lines
480 B
JavaScript
'use strict';
|
|
require('../common');
|
|
var assert = require('assert');
|
|
var util = require('util');
|
|
var repl = require('repl');
|
|
var zlib = require('zlib');
|
|
|
|
// just use builtin stream inherited from Duplex
|
|
var putIn = zlib.createGzip();
|
|
var testMe = repl.start('', putIn, function(cmd, context, filename, callback) {
|
|
callback(null, cmd);
|
|
});
|
|
|
|
testMe._domain.on('error', function(e) {
|
|
assert.fail();
|
|
});
|
|
|
|
testMe.complete('', function(err, results) {
|
|
assert.equal(err, null);
|
|
});
|