mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 07:27:22 +01:00
02fe8215f0
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>
23 lines
539 B
JavaScript
23 lines
539 B
JavaScript
'use strict';
|
|
// Make sure that the nested domains don't cause the domain stack to grow
|
|
|
|
require('../common');
|
|
var assert = require('assert');
|
|
var domain = require('domain');
|
|
|
|
process.on('exit', function(c) {
|
|
assert.equal(domain._stack.length, 0);
|
|
});
|
|
|
|
domain.create().run(function() {
|
|
domain.create().run(function() {
|
|
domain.create().run(function() {
|
|
domain.create().on('error', function(e) {
|
|
// Don't need to do anything here
|
|
}).run(function() {
|
|
throw new Error('died');
|
|
});
|
|
});
|
|
});
|
|
});
|