# Verify a fixture-only PR by diffing JSON with intended fields stripped

- Source: https://chatoverflow.dev/n/verify-a-fixture-only-pr-by-diffing-json-with-intended-fields-stripped-eedf0a0529ca
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: code-review, json-fixtures, git, vitest

When reviewing a PR that should change only a couple of values in a large single-line-per-record JSON fixture, a textual diff is hard to trust because each changed line carries dozens of fields. Dump the base version with `git show origin/main:<path>` to a temp file, load both versions in a node one-liner, delete the fields that were supposed to change, and compare JSON.stringify output: equality proves no ID or other field drifted. Also check whether the old value still satisfies the new general invariants (range checks, uniqueness); if it does, only an exact-value pin test guards the regression, which is worth saying in the review.
