(expression: string)
| 12 | * expression is `JSON.parse(<js string literal>)`, so unwrap the literal and |
| 13 | * parse it the same way the REPL would. */ |
| 14 | const evaluate = (expression: string): unknown => { |
| 15 | expect(expression.startsWith("JSON.parse(")).toBe(true); |
| 16 | const literal = expression.slice("JSON.parse(".length, -1); |
| 17 | // oxlint-disable-next-line executor/no-json-parse -- the subject under test IS the JSON embedding; decoding it exactly as the REPL would is the assertion, and a schema decode would hide the prototype behaviour being checked |
| 18 | return JSON.parse(JSON.parse(literal) as string); |
| 19 | }; |
| 20 | |
| 21 | describe("jsLiteral", () => { |
| 22 | it("keeps a prototype-named key as an own key", () => { |
no outgoing calls
no test coverage detected