(/** @type {string} */ message, /** @type {string} */ txt)
| 108 | // Feed V8-shaped messages directly so the engine-specific text is fixed and the |
| 109 | // transformation is checked the same way on V8 and JSC. |
| 110 | const wrap = (/** @type {string} */ message, /** @type {string} */ txt) => |
| 111 | new JSONParseError(new SyntaxError(message), txt, txt); |
| 112 | |
| 113 | it("rewrites an unexpected token to include its char code", () => { |
| 114 | const err = wrap("Unexpected token 'o', \"foo\" is not valid JSON", "foo"); |