( result: AssertedFnCallResult, ctx: AssertionContext )
| 280 | threw?: string |
| 281 | } |
| 282 | export const getThrownMessage = ( |
| 283 | result: AssertedFnCallResult, |
| 284 | ctx: AssertionContext |
| 285 | ): string | undefined => { |
| 286 | if (!("threw" in result)) { |
| 287 | throwAssertionError({ |
| 288 | message: "Function didn't throw", |
| 289 | stack: ctx.assertionStack |
| 290 | }) |
| 291 | } |
| 292 | |
| 293 | return result.threw |
| 294 | } |
| 295 | export const callAssertedFunction = ( |
| 296 | asserted: Function |
| 297 | ): AssertedFnCallResult => { |
no test coverage detected