summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-12-26 19:43:15 +0800
committerAnna Henningsen <anna@addaleax.net>2018-12-31 01:20:33 +0100
commit39a2ac4c6ba189fd1596572655dbd6c8daff2d5f (patch)
treebabeb14a208175426eb6bb137d880332677dc670 /test
parent6c7c77ef05a04ffa5532056f8a1ea44a946c2014 (diff)
downloadandroid-node-v8-39a2ac4c6ba189fd1596572655dbd6c8daff2d5f.tar.gz
android-node-v8-39a2ac4c6ba189fd1596572655dbd6c8daff2d5f.tar.bz2
android-node-v8-39a2ac4c6ba189fd1596572655dbd6c8daff2d5f.zip
process: move process.features initialization into node.js
Use `internalBinding('config')` to shim the legacy `process.features`. PR-URL: https://github.com/nodejs/node/pull/25239 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-process-features.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/parallel/test-process-features.js b/test/parallel/test-process-features.js
new file mode 100644
index 0000000000..7752cc53b2
--- /dev/null
+++ b/test/parallel/test-process-features.js
@@ -0,0 +1,20 @@
+'use strict';
+
+require('../common');
+const assert = require('assert');
+
+const keys = new Set(Object.keys(process.features));
+
+assert.deepStrictEqual(keys, new Set([
+ 'debug',
+ 'uv',
+ 'ipv6',
+ 'tls_alpn',
+ 'tls_sni',
+ 'tls_ocsp',
+ 'tls'
+]));
+
+for (const key of keys) {
+ assert.strictEqual(typeof process.features[key], 'boolean');
+}