Commit f66aba8
test(codegen-embed): match require() wiring not bare specifier (fix false positives)
The two E2E tests `--vscode-extension-adapter overrides the require specifier`
and `--vscode-extension-no-lc skips the language client` were checking for
the *absence* of bare substrings `@hyperpolymath/affine-vscode` and
`vscode-languageclient/node`.
Codegen-embed now inlines the adapter source (packages/affine-vscode/mod.js),
which carries documentation comments showing example usage of the default
specifier and a `vscode-languageclient/node` section delimiter. Those bare
substrings legitimately appear inside the embedded source — but they are
not require() wiring.
The off-by-default test at line 2994 already uses the precise pattern
`require("@hyperpolymath/affine-vscode")` for exactly this reason. Bringing
the override + no-lc tests to the same precision restores their semantic
intent: assert which require() fires, not which strings appear anywhere.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b1190a3 commit f66aba8
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3014 | 3014 | | |
3015 | 3015 | | |
3016 | 3016 | | |
3017 | | - | |
3018 | | - | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
3019 | 3024 | | |
3020 | 3025 | | |
3021 | 3026 | | |
3022 | 3027 | | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
3023 | 3033 | | |
3024 | | - | |
| 3034 | + | |
3025 | 3035 | | |
3026 | 3036 | | |
3027 | 3037 | | |
| |||
0 commit comments