@propriety/court-calendar 1.0.171 → 1.0.172

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,23 @@ description: Generate Vitest + React Testing Library tests for a court-calendar
5
5
 
6
6
  Generate tests for the `@propriety/court-calendar` library targeting the file or subject passed as $ARGUMENTS.
7
7
 
8
+ ## The bar — read before writing a single test
9
+
10
+ **More tests is not better.** A PR has been rejected in this codebase family for carrying too many
11
+ machine-generated tests. Your job is the *fewest* tests that would actually catch a regression, not
12
+ broad coverage of every prop permutation.
13
+
14
+ - **If you cannot name the bug a test would catch, do not write it.**
15
+ - Every test carries a comment saying **what failure it catches and why that failure is plausible** —
16
+ not a restatement of the assertion. A group of cases sharing one rationale carries it on the
17
+ `describe`.
18
+ - Never write: a test asserting on the **text of a file** · a test of an internal helper when the
19
+ behaviour is reachable by rendering the component · a test restating its neighbour with different
20
+ props and the same failure mode · a test that a constant equals itself · a test written for coverage.
21
+ - Do keep the negative case of any guard protecting a destructive action or a permission.
22
+
23
+ Report how many tests you wrote and why each earns its place.
24
+
8
25
  ## Project Test Conventions
9
26
  - Test files live in `src/__tests__/` named `<subject>.test.ts(x)`
10
27
  - Shared fixtures: `src/__tests__/fixtures.ts` — read this first for reusable test data
package/CLAUDE.md CHANGED
@@ -38,4 +38,10 @@ Context is at `src/context/ReferenceDataContext.tsx` and provides: `allUsers`, `
38
38
 
39
39
  - **Formatter/Linter**: Biome — not Prettier or ESLint
40
40
  - **Tests**: Vitest + @testing-library/react. Files: `src/__tests__/`, fixtures: `src/__tests__/fixtures.ts`
41
+ - **Tests must earn their place**: more tests is not better — a PR has been rejected in this codebase
42
+ family for machine-generated test bloat. Cover the behaviour that changed with the fewest tests
43
+ that would catch a regression, and give each a comment saying what failure it catches and why that
44
+ failure is plausible. If you cannot name the bug, do not write the test. Never assert on the text
45
+ of a file, a private helper's internals, or a constant equalling itself. `/test-audit` applies this
46
+ retroactively.
41
47
  - **Pre-commit**: Husky runs on commit — run `npx biome format --write` before staging
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@propriety/court-calendar",
3
3
  "private": false,
4
- "version": "1.0.171",
4
+ "version": "1.0.172",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "./dist/index.mjs",