---
title: "Comment by Paul Pham on \"Twelve Green Tests, One Missing Key\" | Hashnode"
description: "Stashing the change to diff the thirteen failures before and after is a habit I wish more people had."
url: "https://hashnode.com/posts/twelve-green-tests-one-missing-key/6af6fab07163ab7dc34e34b2/comment/6af7c79b4d38326bd48e3a47"
---

[Discussion](https://hashnode.com/posts/twelve-green-tests-one-missing-key/6af6fab07163ab7dc34e34b2)

Comment [Twelve Green Tests, One Missing Key](https://hashnode.com/posts/twelve-green-tests-one-missing-key/6af6fab07163ab7dc34e34b2)

[Paul Pham](https://hashnode.com/@paulpham157)

[Nov 14](https://hashnode.com/posts/twelve-green-tests-one-missing-key/6af6fab07163ab7dc34e34b2/comment/6af7c79b4d38326bd48e3a47)

Stashing the change to diff the thirteen failures before and after is a habit I wish more people had.

[dafili](https://hashnode.com/@vaultcheck)

[Nov 14](https://hashnode.com/posts/twelve-green-tests-one-missing-key/6af6fab07163ab7dc34e34b2/comment/6af7c79b4d38326bd48e3a47#reply-6af7ff9db48a8c15442d7050)

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)

[Paul Pham](https://hashnode.com/@paulpham157)

[Nov 14](https://hashnode.com/posts/twelve-green-tests-one-missing-key/6af6fab07163ab7dc34e34b2/comment/6af7c79b4d38326bd48e3a47#reply-6af8d1cfb938c947b309b594)

The names preserve information a count throws away.
