()
| 121 | |
| 122 | |
| 123 | export function testOnoConstructorWithNew() { |
| 124 | let customOno = new Ono(CustomErrorClass); |
| 125 | let error = customOno(message, param1, param2); |
| 126 | |
| 127 | // Error props |
| 128 | error.name = "string"; |
| 129 | error.message = "string"; |
| 130 | error.stack = "string"; |
| 131 | |
| 132 | // OnoError props |
| 133 | error.toJSON(); |
| 134 | error[inspect.custom](); |
| 135 | |
| 136 | // CustomErrorClass props |
| 137 | error.isValid = true; |
| 138 | error.toJSON().isValid = true; |
| 139 | error[inspect.custom]().isValid = true; |
| 140 | } |
| 141 | |
| 142 | |
| 143 | export function testOnoConstructorWithNonErrorClass() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…