mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
baa4b9b425
The current API is somewhat confusing at times and simpler usage is possible. This overloads the arguments further to accept objects with deprecation codes as property keys. It also adds documentation for the different possible styles. Besides that it is now going to validate for the code being present in case of deprecations but not for other cases. The former validation was not consistent as it only validated some cases and accepted undefined instead of `common.noWarnCode`. This check is removed due to the lack of consistency. `common.noWarnCode` is completely removed due to just being sugar for `undefined`. This also verifies that the warning order is identical to the order in which they are triggered. PR-URL: https://github.com/nodejs/node/pull/25251 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
19 lines
516 B
JavaScript
19 lines
516 B
JavaScript
// Flags: --inspect=0
|
|
'use strict';
|
|
const common = require('../common');
|
|
|
|
// The inspector attempts to start when Node starts. Once started, the inspector
|
|
// warns on the use of a SIGPROF listener.
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
if (common.isWindows)
|
|
common.skip('test does not apply to Windows');
|
|
|
|
common.skipIfWorker(); // Worker inspector never has a server running
|
|
|
|
common.expectWarning('Warning',
|
|
'process.on(SIGPROF) is reserved while debugging');
|
|
|
|
process.on('SIGPROF', () => {});
|