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

Function assert_function_name

test/fixtures/wpt/wasm/jsapi/assertions.js:1–8  ·  view source on GitHub ↗
(fn, name, description)

Source from the content-addressed store, hash-verified

1function assert_function_name(fn, name, description) {
2 const propdesc = Object.getOwnPropertyDescriptor(fn, "name");
3 assert_equals(typeof propdesc, "object", `${description} should have name property`);
4 assert_false(propdesc.writable, "writable", `${description} name should not be writable`);
5 assert_false(propdesc.enumerable, "enumerable", `${description} name should not be enumerable`);
6 assert_true(propdesc.configurable, "configurable", `${description} name should be configurable`);
7 assert_equals(propdesc.value, name, `${description} name should be ${name}`);
8}
9globalThis.assert_function_name = assert_function_name;
10
11function assert_function_length(fn, length, description) {

Callers 11

assert_exported_functionFunction · 0.85
test_operationsFunction · 0.85
test_attributesFunction · 0.85
constructor.any.jsFile · 0.85
constructor.any.jsFile · 0.85
constructor.any.jsFile · 0.85
constructor.any.jsFile · 0.85
constructor.any.jsFile · 0.85

Calls 3

assert_equalsFunction · 0.50
assert_falseFunction · 0.50
assert_trueFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…