xref: /third_party/node/test/parallel/test-process-binding-util.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_cirequire('../common');
31cb0ef41Sopenharmony_ciconst assert = require('assert');
41cb0ef41Sopenharmony_ciconst util = require('util');
51cb0ef41Sopenharmony_ci
61cb0ef41Sopenharmony_ciconst utilBinding = process.binding('util');
71cb0ef41Sopenharmony_ciassert.deepStrictEqual(
81cb0ef41Sopenharmony_ci  Object.keys(utilBinding).sort(),
91cb0ef41Sopenharmony_ci  [
101cb0ef41Sopenharmony_ci    'isAnyArrayBuffer',
111cb0ef41Sopenharmony_ci    'isArrayBuffer',
121cb0ef41Sopenharmony_ci    'isArrayBufferView',
131cb0ef41Sopenharmony_ci    'isAsyncFunction',
141cb0ef41Sopenharmony_ci    'isDataView',
151cb0ef41Sopenharmony_ci    'isDate',
161cb0ef41Sopenharmony_ci    'isExternal',
171cb0ef41Sopenharmony_ci    'isMap',
181cb0ef41Sopenharmony_ci    'isMapIterator',
191cb0ef41Sopenharmony_ci    'isNativeError',
201cb0ef41Sopenharmony_ci    'isPromise',
211cb0ef41Sopenharmony_ci    'isRegExp',
221cb0ef41Sopenharmony_ci    'isSet',
231cb0ef41Sopenharmony_ci    'isSetIterator',
241cb0ef41Sopenharmony_ci    'isTypedArray',
251cb0ef41Sopenharmony_ci    'isUint8Array',
261cb0ef41Sopenharmony_ci  ]);
271cb0ef41Sopenharmony_ci
281cb0ef41Sopenharmony_cifor (const k of Object.keys(utilBinding)) {
291cb0ef41Sopenharmony_ci  assert.strictEqual(utilBinding[k], util.types[k]);
301cb0ef41Sopenharmony_ci}
31

Indexes created Thu Nov 07 10:32:03 CST 2024