Commit 6999f1c
committed
test(#246): replay harness foundation — record real API responses, replay through the real pipeline
Stands up deterministic integration tests with no live API [skip-release]:
- test/cassettes/record.mjs — records real CWA API responses (route → manifest →
all resource IRIs) into a committed cassette; drives the dev API (self-signed
cert accepted). First cassette: topic-1-nested (home, /topic-1 redirect,
chapter-one/two nested siblings, form, real 404 sub-resources, link headers).
- ReplayCwaFetch — serves cassette responses via fetch.raw, throwing ofetch-shaped
errors for non-2xx, with CONTROLLABLE TIMING (manual hold/release) so tests can
interleave navigations and reproduce timing races deterministically.
- Boot harness — assembles the real Fetcher + FetchStatusManager + Pinia stores +
Resources against the replay, mocking only useError/clearError + nuxt/app.
- First integration test: a nested navigation loads parent + child correctly from
recorded responses through the whole pipeline.
- vitest.config: also run test/**/*.spec.ts.
Next: manual-timing race tests (switch-before-load / stuck), then re-apply #257
and reproduce the regression against this harness.1 parent 91ed679 commit 6999f1c
7 files changed
Lines changed: 3405 additions & 1 deletion
File tree
- test
- cassettes
- integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
0 commit comments