(fn, length, description)
| 9 | globalThis.assert_function_name = assert_function_name; |
| 10 | |
| 11 | function 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 | } |
| 19 | globalThis.assert_function_length = assert_function_length; |
| 20 | |
| 21 | function assert_exported_function(fn, { name, length }, description) { |
no test coverage detected
searching dependent graphs…