Skip to content

Commit 150ad15

Browse files
committed
docs(driver-tests): drop vitest name filter
1 parent 5ffa0d0 commit 150ad15

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

  • .claude/skills/driver-test-runner

.claude/skills/driver-test-runner/SKILL.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Env overrides recognized by the test harness:
3535
- `RIVETKIT_DRIVER_TEST_SQLITE` — comma-separated subset of `local,remote`.
3636
- `RIVETKIT_DRIVER_TEST_ENCODING` — comma-separated subset of `bare,cbor,json`.
3737

38-
When **any** of these env vars is set, the inner describe block name changes from `encoding (<encoding>)` to `runtime (<runtime>) / sqlite (<backend>) / encoding (<encoding>)`. The skill always sets the env vars, so the longer form is always what `-t` must match.
38+
When **any** of these env vars is set, the inner describe block name changes from `encoding (<encoding>)` to `runtime (<runtime>) / sqlite (<backend>) / encoding (<encoding>)`. The skill always sets the env vars, so expect the longer form in test output.
3939

4040
## How It Works
4141

@@ -173,14 +173,16 @@ For each unchecked row in order, run the runtimes selected by the `runtime` arg
173173
| native | local |
174174
| wasm | remote |
175175

176-
**b) Build the filter command:**
176+
**b) Build the scoped file command:**
177177

178178
Each suite lives in its own file under `rivetkit-typescript/packages/rivetkit/tests/driver/<file>.test.ts`. With env overrides set, the describe block nesting is:
179179

180180
```
181181
<Outer Suite> > static registry > runtime (<runtime>) / sqlite (<backend>) / encoding (<encoding>) > <Suite Description>
182182
```
183183

184+
Do not use Vitest `-t` for driver matrix cells. The env vars already constrain the file to one runtime/backend/encoding cell, and the `-t` path can break `describe.sequential` ordering in this suite.
185+
184186
Base command (native):
185187

186188
```bash
@@ -189,7 +191,6 @@ cd rivetkit-typescript/packages/rivetkit && \
189191
RIVETKIT_DRIVER_TEST_SQLITE=local \
190192
RIVETKIT_DRIVER_TEST_ENCODING=bare \
191193
pnpm test tests/driver/<FILE>.test.ts \
192-
-t "static registry.*runtime \\(native\\) / sqlite \\(local\\) / encoding \\(bare\\).*<SUITE_DESCRIPTION>" \
193194
> /tmp/driver-test-current.log 2>&1
194195
echo "EXIT: $?"
195196
```
@@ -202,14 +203,11 @@ cd rivetkit-typescript/packages/rivetkit && \
202203
RIVETKIT_DRIVER_TEST_SQLITE=remote \
203204
RIVETKIT_DRIVER_TEST_ENCODING=bare \
204205
pnpm test tests/driver/<FILE>.test.ts \
205-
-t "static registry.*runtime \\(wasm\\) / sqlite \\(remote\\) / encoding \\(bare\\).*<SUITE_DESCRIPTION>" \
206206
> /tmp/driver-test-current.log 2>&1
207207
echo "EXIT: $?"
208208
```
209209

210-
Replace `<FILE>` with the file name stem (part before the `|` in the progress file) and `<SUITE_DESCRIPTION>` with the suite description (part after the `|`). Escape parentheses in the description if present. Forward slashes inside the describe path do not need to be escaped.
211-
212-
**Important:** The suite description in the `-t` filter must match the inner `describe(...)` text in the test file exactly. Some mappings:
210+
Replace `<FILE>` with the file name stem (part before the `|` in the progress file). Keep the suite description in the progress file for human-readable tracking only. Some mappings:
213211

214212
| File | Suite Description Text |
215213
|------|----------------------|
@@ -275,7 +273,7 @@ If both runtime boxes are now checked, the file is fully done; advance to the ne
275273
**e) If tests fail:**
276274

277275
1. Do NOT move to the next runtime or file.
278-
2. Narrow down to the first failing test using a more specific `-t` filter (keep the same env vars).
276+
2. Inspect the failing output and isolate with a temporary `.only` only when single-test debugging is necessary.
279277
3. Read the error output to understand the failure.
280278
4. Append to the log:
281279

@@ -292,18 +290,19 @@ If both runtime boxes are now checked, the file is fully done; advance to the ne
292290

293291
### 5. Narrowing scope on failure
294292

295-
If a file group fails, narrow to individual tests while keeping the same runtime env vars:
293+
If a file group fails, keep the same runtime env vars and rerun the file after adding a temporary `.only` to the failing test:
296294

297295
```bash
298296
cd rivetkit-typescript/packages/rivetkit && \
299297
RIVETKIT_DRIVER_TEST_RUNTIME=<runtime> \
300298
RIVETKIT_DRIVER_TEST_SQLITE=<backend> \
301299
RIVETKIT_DRIVER_TEST_ENCODING=bare \
302300
pnpm test tests/driver/<FILE>.test.ts \
303-
-t "static registry.*runtime \\(<runtime>\\) / sqlite \\(<backend>\\) / encoding \\(bare\\).*<SUITE>.*<PARTIAL_TEST_NAME>" \
304301
> /tmp/driver-test-narrow.log 2>&1
305302
```
306303

304+
Remove the temporary `.only` before committing. Do not use `-t` as a flake workaround.
305+
307306
If the bug only appears on one runtime, that's a strong signal — focus the diff hunt on the corresponding runtime adapter (`napi-runtime.ts` / `wasm-runtime.ts`) and any wasm-feature-gated code in `rivetkit-core` and `rivetkit-typescript/packages/rivetkit-wasm`.
308307

309308
### 6. Completion

0 commit comments

Comments
 (0)