Repository navigation
Commit f33a268
test(landing): read the generated pages from the render, not from disk
Only Lint was red on #192, and all three failures were the same thing: the
landing pages are now rendered by bin/build-pages.mjs at build/dev time and
deliberately not committed, but three tests still read them out of public/.
They passed locally because a build had left the files there -- i.e. they were
asserting against my last build's leftovers -- and failed on a clean checkout.
generated-pages 62 uncommitted outputs reported "stale"
design-contract found 5 pages, expected >15
landing-pages ENOENT public/webmcp-document-editor.html
generate({ outDir: null }) already renders every page in memory, which is what
the body of landing-pages.test.ts uses, so the remaining three switch to it.
The WebMCP and homepage checks now iterate every locale that has the page
instead of naming en and zh, so the next language is covered for free.
Also untracks public/zh-CN/index.html: the only output that has to stay in the
repo is the root index.html (a Rollup entry -- a build must not depend on a
plugin having written its inputs). ja/index.html was already ignored, so half
the homepages were committed and half were not. check() now consults an
explicit COMMITTED set instead of every output.
Reverse-verified: appending a comment to index.html reddens the staleness
check; renaming the shell's <header class="bar"> reddens the chrome check on
every generated page; renaming a tool in lib/web-mcp.ts reddens the WebMCP
check. Ran in a clean worktree with no generated pages on disk (CI's shape):
47 files, 1255 tests green.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 21713f8 commit f33a268
8 files changed
Lines changed: 139 additions & 492 deletions
File tree
- bin
- docs/explorations
- public/zh-CN
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
1070 | 1072 | | |
1071 | 1073 | | |
1072 | 1074 | | |
1073 | | - | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
1074 | 1085 | | |
1075 | 1086 | | |
1076 | 1087 | | |
| 1088 | + | |
1077 | 1089 | | |
1078 | 1090 | | |
1079 | 1091 | | |
| |||
| 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 | + | |
0 commit comments