mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
644fdd60d4
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>
17 lines
409 B
JavaScript
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.
|