0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-err-name-deprecation.js
Anna Henningsen 1482547441
process: add --pending-deprecation to process.binding()
Print a deprecation warning for `process.binding()` when using
`--pending-deprecation`.

PR-URL: https://github.com/nodejs/node/pull/26500
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-03-11 10:04:15 +00:00

17 lines
436 B
JavaScript

'use strict';
const common = require('../common');
// Flags: --pending-deprecation
common.expectWarning({
DeprecationWarning: [
['process.binding() is deprecated. Please use public APIs instead.',
'DEP0111'],
['Directly calling process.binding(\'uv\').errname(<val>) is being ' +
'deprecated. Please make sure to use util.getSystemErrorName() instead.',
'DEP0119']
]
});
process.binding('uv').errname(-1);