0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/test/parallel/test-domain-load-after-set-uncaught-exception-capture.js
Ruben Bridgewater 644fdd60d4
test: minor refactoring
Add punctuation and comments about code that should not throw.
Also remove a obsolete test and refactor some tests.

PR-URL: https://github.com/nodejs/node/pull/18669
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-16 16:54:07 +01:00

17 lines
409 B
JavaScript

'use strict';
const common = require('../common');
process.setUncaughtExceptionCaptureCallback(common.mustNotCall());
common.expectsError(
() => require('domain'),
{
code: 'ERR_DOMAIN_CALLBACK_NOT_AVAILABLE',
type: Error,
message: /^A callback was registered.*with using the `domain` module/
}
);
process.setUncaughtExceptionCaptureCallback(null);
require('domain'); // Should not throw.