MCPcopy Index your code
hub / github.com/nodejs/node / test

Function test

test/parallel/test-binding-constants.js:20–28  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

18// Make sure all the constants objects don't inherit from Object.prototype
19const inheritedProperties = Object.getOwnPropertyNames(Object.prototype);
20function test(obj) {
21 assert(obj);
22 assert.strictEqual(Object.prototype.toString.call(obj), '[object Object]');
23 assert.strictEqual(Object.getPrototypeOf(obj), null);
24
25 inheritedProperties.forEach((property) => {
26 assert.strictEqual(property in obj, false);
27 });
28}
29
30[
31 constants, constants.crypto, constants.fs, constants.internal, constants.os, constants.trace,

Callers

nothing calls this directly

Calls 3

forEachMethod · 0.65
assertFunction · 0.50
callMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…