| 49 | |
| 50 | |
| 51 | export function testExtendedPropertiesWithOriginalError() { |
| 52 | let error = ono(customError, { foo: 123, bar: true }); |
| 53 | |
| 54 | // Error props |
| 55 | error.name = "string"; |
| 56 | error.message = "string"; |
| 57 | error.stack = "string"; |
| 58 | |
| 59 | // customError props |
| 60 | error.isValid = true; |
| 61 | |
| 62 | // OnoError props |
| 63 | error.toJSON(); |
| 64 | error[inspect.custom](); |
| 65 | |
| 66 | // Extended props |
| 67 | error.foo = 123; |
| 68 | error.bar = true; |
| 69 | error.toJSON().foo = 123; |
| 70 | error.toJSON().bar = true; |
| 71 | error[inspect.custom]().foo = 123; |
| 72 | error[inspect.custom]().bar = true; |
| 73 | } |
| 74 | |
| 75 | |
| 76 | export function testExtendedPropertiesWithCustomOno() { |