Dev.to
7/24/2026

The original title is "236 Tests Passed. The Release Was Still Broken."
Original: 236 Tests Passed. The Release Was Still Broken.
Short summary
A developer fixed a timezone bug in claude-code-notify and all 236 local tests passed, but CI failed because the test environment ran in UTC while local ran in Hong Kong time. The root cause was tests that derived expected values from the same timezone context as the code under test, making them self-consistent but not actually verifying correctness. The article provides a detailed lesson on why green tests can still be lying when expectations aren't anchored to external, explicit references.
- •236 local tests passed but CI failed due to UTC vs Hong Kong timezone mismatch
- •Tests were self-consistent but not correct — timezone cancelled out of both sides of assertions
- •Lesson: anchor test expectations to external explicit references, not ambient environment state
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



