diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-02-25 22:27:55 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-03-07 17:43:21 +0100 |
commit | aec34473a7eddae32e6c359715ce521446066210 (patch) | |
tree | f573d6650df40555d6924bce04fabc2868bad55d /test/common/index.js | |
parent | 1133e0bf8b6f63a569b0788dde82f62bc08534ac (diff) | |
download | android-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/common/index.js')
-rw-r--r-- | test/common/index.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/common/index.js b/test/common/index.js index 077bb9218d..084f82b115 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -29,10 +29,9 @@ const os = require('os'); const { exec, execSync, spawnSync } = require('child_process'); const util = require('util'); const tmpdir = require('./tmpdir'); -const { - bits, - hasIntl -} = process.binding('config'); +const bits = ['arm64', 'mips', 'mipsel', 'ppc64', 's390x', 'x64'] + .includes(process.arch) ? 64 : 32; +const hasIntl = !!process.config.variables.v8_enable_i18n_support; const { isMainThread } = require('worker_threads'); // Some tests assume a umask of 0o022 so set that up front. Tests that need a |