Repository navigation
fix(ci): restore unit coverage and contrast audit after R4 - #178
Merged
Merged
Conversation
CI on 4b8481a failed the unit job's coverage floor: branches added by the stage branch had no direct-call tests. Covers R4's shell-unavailable and HEAD 404s (worker/index.ts), probeDictionaryEntry's NFKC fallback and both fail-open paths, a bare prefixed legacy hash, and the hash shim's no-DOM guard.
R4 makes unmatched entry paths hard-404, and the CI audit's first five routes included /生 and /:客, which the Miniflare fixture never seeded (they used to soft-200 as not-found pages). CI now audits an explicit fixture route list (/萌 /黃 /'食 /'長褲 /:字); the full list for local runs is unchanged. The hover step now skips the external 異體字 icon (.variants-link), which is the first result link on Hakka entries and never opens a tooltip.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the two CI jobs that failed on main after #177 (run 38903942640).
Unit tests (vitest): all 2178 tests passed, but the 100% coverage floor failed on branches the stage branch added without direct-call tests. Adds 7 tests: R4's shell-unavailable 404 and HEAD 404 (
worker/index.ts),probeDictionaryEntry's NFKC fallback (hit / miss / both fail-open paths), a bare prefixed legacy hash (#',#:), andapplyLegacyHashRewritewithout a DOM.Dark/light contrast audit: R4 made unmatched entry paths 404, and the CI audit's first five routes included
/生and/:客, which the Miniflare fixture never seeded (they had been auditing soft-200 not-found pages). CI now uses an explicit fixture-seeded list (/萌 /黃 /'食 /'長褲 /:字); the full route list for local runs is unchanged. The hover step also skips the external 異體字 icon, which is the first result link on Hakka entries and never opens a tooltip.Verified locally:
vp run test:unit --coverage2185 passed, 100% statements/branches/functions/lines; CI-mode contrast audit against the seeded fixture server: 0 contrast failures, 0 unexpected action failures;vp check0 errors.No runtime code changes, so no deploy is needed.