mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 22:56:06 +00:00

Use assert.strictEqual() instead of assert.equal(). PR-URL: https://github.com/nodejs/node/pull/10269 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
23 lines
623 B
JavaScript
23 lines
623 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const domain = require('domain');
|
|
const assert = require('assert');
|
|
|
|
const d = domain.create();
|
|
|
|
process.on('uncaughtException', common.mustCall(function onUncaught() {
|
|
assert.strictEqual(process.domain, null,
|
|
'domains stack should be empty in uncaughtException' +
|
|
' handler');
|
|
}));
|
|
|
|
process.on('beforeExit', common.mustCall(function onBeforeExit() {
|
|
assert.strictEqual(process.domain, null,
|
|
'domains stack should be empty in beforeExit handler');
|
|
}));
|
|
|
|
d.run(function() {
|
|
throw new Error('boom');
|
|
});
|