mirror of
https://github.com/nodejs/node.git
synced 2025-05-09 07:27:32 +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>
17 lines
415 B
JavaScript
17 lines
415 B
JavaScript
'use strict';
|
|
// Make sure the domain stack doesn't get clobbered by un-matched .exit()
|
|
|
|
require('../common');
|
|
var assert = require('assert');
|
|
var domain = require('domain');
|
|
|
|
var a = domain.create();
|
|
var b = domain.create();
|
|
|
|
a.enter(); // push
|
|
b.enter(); // push
|
|
assert.deepEqual(domain._stack, [a, b], 'b not pushed');
|
|
|
|
domain.create().exit(); // no-op
|
|
assert.deepEqual(domain._stack, [a, b], 'stack mangled!');
|