()
| 141 | |
| 142 | |
| 143 | export function testOnoConstructorWithNonErrorClass() { |
| 144 | let customOno = new Ono(CustomClass); |
| 145 | let error = customOno(message, param1, param2); |
| 146 | |
| 147 | // Error props |
| 148 | error.name = "string"; |
| 149 | error.message = "string"; |
| 150 | error.stack = "string"; |
| 151 | |
| 152 | // OnoError props |
| 153 | error.toJSON(); |
| 154 | error[inspect.custom](); |
| 155 | |
| 156 | // CustomClass props |
| 157 | error.code = 12345; |
| 158 | error.toJSON().code = 12345; |
| 159 | error[inspect.custom]().code = 12345; |
| 160 | } |
| 161 | |
| 162 | |
| 163 | export function testOnoToJSON() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…