Paste received and expected JSON, choose a Jest-style matcher and inspect PASS/FAIL, diff rows and explanation without sending examples to a backend.
Use curated presets or paste JSON values to check matcher semantics before writing a test or reviewing an assertion.
Two identical object literals fail identity matching but pass deep equality. Object.is identity semantics for primitives; separate JSON objects are not the same reference.
FAIL: expect(received).toBe failed.
expect(received).toBe({"id":"release-42","flags":["search","adsense"],"meta":{"stable":true}});$Expected: {"id":"release-42","flags":["search","adsense"],"meta":{"stable":true}}
Received: {"id":"release-42","flags":["search","adsense"],"meta":{"stable":true}}
toBe is right for primitives and references, but copied object literals usually need toEqual or toStrictEqual. Seeing both outcomes side by side makes assertion intent easier to review.
toMatchObject is useful when the test cares about a subset of a response. The diff focuses on missing or changed expected keys instead of distracting reviewers with unrelated fields.
The playground avoids executing JavaScript or regex, blocks prototype-pollution keys and keeps examples within size limits so it remains a safe public review surface.
Matcher choices sit next to lint rules, parser output, configuration and schema validation. These tools cover the adjacent review steps.
No. It is a focused matcher explainer that mirrors common Jest-style semantics for JSON values. It does not execute a test runner or arbitrary JavaScript.
Use {"$pfType":"undefined"} or {"$pfType":"NaN"}. Those sentinels keep the input JSON-only while still covering important matcher cases.
The public MVP uses plain substring matching to avoid ReDoS and execution complexity. Regex behavior should be confirmed in the repository test suite.
No. Evaluation runs in the browser for this playground. The MVP does not add accounts, history, remote fetch or backend execution.