()
| 74 | |
| 75 | |
| 76 | export function testExtendedPropertiesWithCustomOno() { |
| 77 | let customOno = new Ono(CustomErrorClass); |
| 78 | let error = customOno({ foo: 123, bar: true }); |
| 79 | |
| 80 | // Error props |
| 81 | error.name = "string"; |
| 82 | error.message = "string"; |
| 83 | error.stack = "string"; |
| 84 | |
| 85 | // CustomErrorClass props |
| 86 | error.isValid = true; |
| 87 | |
| 88 | // OnoError props |
| 89 | error.toJSON(); |
| 90 | error[inspect.custom](); |
| 91 | |
| 92 | // Extended props |
| 93 | error.foo = 123; |
| 94 | error.bar = true; |
| 95 | error.toJSON().foo = 123; |
| 96 | error.toJSON().bar = true; |
| 97 | error[inspect.custom]().foo = 123; |
| 98 | error[inspect.custom]().bar = true; |
| 99 | } |
| 100 | |
| 101 | |
| 102 | export function testOnoConstructorWithoutNew() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…