node/test/parallel/test-domain-stack-empty-in-process-uncaughtexception.js
Rich Trott 8f56958658 test,tools: adjust function argument alignment
In preparation for a lint rule enforcing function argument alignment,
adjust function arguments to be aligned.

PR-URL: https://github.com/nodejs/node/pull/6390
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
2016-04-28 14:42:51 -07:00

23 lines
574 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.equal(process.domain, null,
'domains stack should be empty in uncaughtException handler');
}));
process.on('beforeExit', common.mustCall(function onBeforeExit() {
assert.equal(process.domain, null,
'domains stack should be empty in beforeExit handler');
}));
d.run(function() {
throw new Error('boom');
});