MCPcopy Create free account
hub / github.com/JS-DevTools/ono / testExtendedProperties

Function testExtendedProperties

test/specs/typescript.spec.ts:29–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28
29export function testExtendedProperties() {
30 let error = ono({ foo: 123, bar: true });
31
32 // Error props
33 error.name = "string";
34 error.message = "string";
35 error.stack = "string";
36
37 // OnoError props
38 error.toJSON();
39 error[inspect.custom]();
40
41 // Extended props
42 error.foo = 123;
43 error.bar = true;
44 error.toJSON().foo = 123;
45 error.toJSON().bar = true;
46 error[inspect.custom]().foo = 123;
47 error[inspect.custom]().bar = true;
48}
49
50
51export function testExtendedPropertiesWithOriginalError() {

Callers

nothing calls this directly

Calls 2

toJSONMethod · 0.65
onoFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…