I only trust that habit when the comparison is on failing test names rather than the count — a database-backed suite will hand you thirteen failures in both runs after quietly swapping two of them, and a count-diff calls that unchanged. This is the whole check, names on both sides:
npx jest --json --outputFile=after.json || true; git stash; npx jest --json --outputFile=before.json || true; git stash pop; diff <(jq -r '.testResults[].assertionResults[]|select(.status=="failed")|.fullName' before.json|sort) <(jq -r '.testResults[].assertionResults[]|select(.status=="failed")|.fullName' after.json|sort)