aboutsummaryrefslogtreecommitdiff
path: root/test/sequential/test-inspector-async-call-stack-abort.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-02-25 22:27:55 +0100
committerAnna Henningsen <anna@addaleax.net>2019-03-07 17:43:21 +0100
commitaec34473a7eddae32e6c359715ce521446066210 (patch)
treef573d6650df40555d6924bce04fabc2868bad55d /test/sequential/test-inspector-async-call-stack-abort.js
parent1133e0bf8b6f63a569b0788dde82f62bc08534ac (diff)
downloadandroid-node-v8-aec34473a7eddae32e6c359715ce521446066210.tar.gz
android-node-v8-aec34473a7eddae32e6c359715ce521446066210.tar.bz2
android-node-v8-aec34473a7eddae32e6c359715ce521446066210.zip
test: remove usage of `process.binding()`
Prefer `internalBinding` or other equivalents over `process.binding()` (except in tests checking `process.binding()` itself). PR-URL: https://github.com/nodejs/node/pull/26304 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/sequential/test-inspector-async-call-stack-abort.js')
-rw-r--r--test/sequential/test-inspector-async-call-stack-abort.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/sequential/test-inspector-async-call-stack-abort.js b/test/sequential/test-inspector-async-call-stack-abort.js
index 946d6dc192..ce2b43cdf0 100644
--- a/test/sequential/test-inspector-async-call-stack-abort.js
+++ b/test/sequential/test-inspector-async-call-stack-abort.js
@@ -12,7 +12,8 @@ if (process.argv[2] === 'child') {
common.disableCrashOnUnhandledRejection();
const { Session } = require('inspector');
const { promisify } = require('util');
- const { registerAsyncHook } = process.binding('inspector');
+ const { internalBinding } = require('internal/test/binding');
+ const { registerAsyncHook } = internalBinding('inspector');
(async () => {
let enabled = 0;
registerAsyncHook(() => ++enabled, () => {});
@@ -28,7 +29,8 @@ if (process.argv[2] === 'child') {
} else {
const { spawnSync } = require('child_process');
const options = { encoding: 'utf8' };
- const proc = spawnSync(process.execPath, [__filename, 'child'], options);
+ const proc = spawnSync(
+ process.execPath, ['--expose-internals', __filename, 'child'], options);
strictEqual(proc.status, 0);
strictEqual(proc.signal, null);
strictEqual(proc.stderr.includes(eyecatcher), true);