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

Function assert_function_length

test/fixtures/wpt/wasm/jsapi/assertions.js:11–18  ·  view source on GitHub ↗
(fn, length, description)

Source from the content-addressed store, hash-verified

9globalThis.assert_function_name = assert_function_name;
10
11function assert_function_length(fn, length, description) {
12 const propdesc = Object.getOwnPropertyDescriptor(fn, "length");
13 assert_equals(typeof propdesc, "object", `${description} should have length property`);
14 assert_false(propdesc.writable, "writable", `${description} length should not be writable`);
15 assert_false(propdesc.enumerable, "enumerable", `${description} length should not be enumerable`);
16 assert_true(propdesc.configurable, "configurable", `${description} length should be configurable`);
17 assert_equals(propdesc.value, length, `${description} length should be ${length}`);
18}
19globalThis.assert_function_length = assert_function_length;
20
21function assert_exported_function(fn, { name, 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…