(/** @type {() => void} */ fn)
| 11 | // is exercised directly against synthetic messages to stay engine-independent. |
| 12 | |
| 13 | const catchError = (/** @type {() => void} */ fn) => { |
| 14 | try { |
| 15 | fn(); |
| 16 | } catch (err) { |
| 17 | return /** @type {JSONParseError} */ (err); |
| 18 | } |
| 19 | throw new Error("expected parseJson to throw"); |
| 20 | }; |
| 21 | |
| 22 | describe("parseJson", () => { |
| 23 | it("parses JSON", () => { |
no test coverage detected