mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 23:10:15 +00:00

Use assert.strictEqual instead of assert.equal in tests, manually convert types where necessary. PR-URL: https://github.com/nodejs/node/pull/10698 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
23 lines
549 B
JavaScript
23 lines
549 B
JavaScript
'use strict';
|
|
// Make sure that the nested domains don't cause the domain stack to grow
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const domain = require('domain');
|
|
|
|
process.on('exit', function(c) {
|
|
assert.strictEqual(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');
|
|
});
|
|
});
|
|
});
|
|
});
|