@boopkit/cap-testing 0.5.6 → 0.5.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boopkit/cap-testing",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "Jest testing setup and testing skills for AI agents",
5
5
  "files": [
6
6
  "scaffold/",
@@ -4,6 +4,11 @@ description: "When you need to build features, implement changes, or fix bugs, f
4
4
  metadata:
5
5
  category: test
6
6
  ---
7
+ > **Read `PROJECT.md`, beside this file, first.**
8
+ > It records how this project applies the guidance below, and where it deliberately differs.
9
+ > Where the two conflict, `PROJECT.md` wins.
10
+ > Record project-specific rules there, never in this file.
11
+
7
12
  # Light TDD Flow
8
13
 
9
14
  Red → Green → Refactor. Document "before" and "after" states.
@@ -4,6 +4,11 @@ description: "When you need to write, run, or reason about tests in this project
4
4
  metadata:
5
5
  category: test
6
6
  ---
7
+ > **Read `PROJECT.md`, beside this file, first.**
8
+ > It records how this project applies the guidance below, and where it deliberately differs.
9
+ > Where the two conflict, `PROJECT.md` wins.
10
+ > Record project-specific rules there, never in this file.
11
+
7
12
  # Testing
8
13
 
9
14
 
@@ -62,7 +67,7 @@ A skip carrying neither a ticket reference nor a `SKIP-OK:` reason is a conventi
62
67
 
63
68
  **The rule.** A change runs the focused tests for what it touched, plus the project's whole-program static check. The full suite runs once per branch, on the work that completes it. The `boop-project-mgmt-beads-planning` skill carries the canonical wording to put on issues; this section is the reasoning behind it, and the two have to keep agreeing.
64
69
 
65
- **The command is `npm run typecheck`** — `tsc -p tsconfig.test.json`, which compiles `src/` and `tests/` as one program and emits nothing. `boop add testing` scaffolds the script and the config together, so in any project with this capability the static check has a name rather than an invocation each agent has to derive.
70
+ **The command is `npm run typecheck`** — `tsc -p tsconfig.test.json`, which compiles `src/` and `tests/` as one program and emits nothing. `boop add testing` scaffolds the script and the config together, so in any project with this capability the static check has a name rather than an invocation each agent has to derive. A focused run names its files: `npx jest <path>`, with one or more test files or folders. It reads the same `jest.config.js` as the full suite, so it runs under the same worker settings.
66
71
 
67
72
  If a project does not have it, add it before following the rule, and check the config before trusting it. A `tsconfig.test.json` that extends a build config and then includes `tests/**/*` inherits `"rootDir": "src"`, and every test file is then a TS6059 "not under rootDir" before a single assertion is read — a static check that fails on every file teaches an agent to skip it. The scaffolded config sets `"rootDir": "."`, `"noEmit": true` and an explicit `"types"` list for exactly that reason; its comments explain each one.
68
73
 
@@ -186,7 +191,7 @@ When a bug is discovered through manual testing or UAT, follow this checklist:
186
191
 
187
192
  1. **Reproduce** — confirm the failure and understand the root cause.
188
193
  2. **Find the test gap** — look for an existing test that *should* have caught it. If one exists, understand why it didn't (usually: it mocked the boundary where the failure lives).
189
- 3. **Write a failing test first** — TDD applies to bug fixes, not just features. Write a test that reproduces the exact failure, confirm it fails for the right reason (Red), *then* apply the fix (Green). See [tdd-light.skill.md](test.tdd-light.skill.md).
194
+ 3. **Write a failing test first** — TDD applies to bug fixes, not just features. Write a test that reproduces the exact failure, confirm it fails for the right reason (Red), *then* apply the fix (Green). See [`boop-testing-tdd-light`](../boop-testing-tdd-light/SKILL.md).
190
195
  4. **Choose the right test level** — if the bug occurred at a system boundary (database, external API, serialization), the test must cross that boundary. A mock-based test cannot catch a boundary failure.
191
196
 
192
197
  ---
@@ -217,12 +222,11 @@ When code produces a schema or structure that is validated by an external system
217
222
 
218
223
  | Subsystem | Skill |
219
224
  |---|---|
220
- | Express app (web & APIs) | [testing-express-web.skill.md](testing-express-web.skill.md) — Jest, HTTP route tests, CLI tools, test helpers |
221
- | Cloudflare edge workers | [testing-cf-workers.skill.md](testing-cf-workers.skill.md) — Worker unit/integration tests, wrangler dev setup |
225
+ | Express app (web & APIs) | [`boop-testing-testing-express-web`](../boop-testing-testing-express-web/SKILL.md) — Jest, HTTP route tests, CLI tools, test helpers |
222
226
 
223
227
  ---
224
228
 
225
229
  ## References
226
230
 
227
- - [development.skill.md](development.skill.md) — Light TDD Flow, completion criteria
231
+ - `boop-coding-development` — Light TDD Flow, completion criteria
228
232
  - [jest.config.js](../../jest.config.js) — Jest configuration, at the project root this capability installs it to
@@ -4,6 +4,11 @@ description: "When you need to write or run tests for the Express server — ser
4
4
  metadata:
5
5
  category: test
6
6
  ---
7
+ > **Read `PROJECT.md`, beside this file, first.**
8
+ > It records how this project applies the guidance below, and where it deliberately differs.
9
+ > Where the two conflict, `PROJECT.md` wins.
10
+ > Record project-specific rules there, never in this file.
11
+
7
12
  # Testing: Express App (Web & APIs)
8
13
 
9
14