* Asserts that the provided function does NOT throw any error.
(testFn: () => void)
| 36 | * Asserts that the provided function does NOT throw any error. |
| 37 | */ |
| 38 | function assertNoThrow(testFn: () => void) { |
| 39 | const error = getThrownError(testFn); |
| 40 | if (error) { |
| 41 | throw new Error(`Expected no error to be thrown, but caught: "${error.message}"`); |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Asserts that the provided function throws an error with a specific message. |
no test coverage detected