padosoft-test-integritylisted
Install: claude install-skill padosoft/skills
# Test integrity
**A test that cannot fail is worse than no test**: it costs the same to run, and it buys a confidence nobody
earned. These are the ways a test passes without testing anything — all found in real review, all green.
---
## 1. The name and the body must match
The assertion on the last line is the direct consequence of the action on the first.
```tsx
// ❌ nothing is edited, so "after edit" is never exercised
it("enables Save after edit", () => {
render(<Form />);
expect(screen.getByRole("button", { name: "Save" })).toBeDisabled();
});
// ✅
it("enables Save after edit", async () => {
render(<Form />);
await user.type(screen.getByLabelText("Title"), "x");
expect(screen.getByRole("button", { name: "Save" })).toBeEnabled();
});
```
A name that promises a transition (`after`, `when`, `once`, `on`) and a body with no action is the single
most common instance.
## 2. Ordering tests need strict comparisons and monotonic fixtures
```ts
// ❌ passes under either order
expect(last).toBeGreaterThanOrEqual(first);
// ✅ fails if the order reverses
expect(second).toBeGreaterThan(first);
```
And the **fixtures must be strictly monotonic**: three rows with the same timestamp make any ordering
assertion vacuous, however strict the operator. The test to run on yourself: *reverse the expected order in
the fake response — does the test fail?* If it does not, it is not testing ordering.
## 3. Global state is restored
Environment variables, container bindin