test: lift frontend coverage to 80%+ and enforce threshold - #216
Open
Uday9909 wants to merge 2 commits into
Open
test: lift frontend coverage to 80%+ and enforce threshold#216Uday9909 wants to merge 2 commits into
Uday9909 wants to merge 2 commits into
Conversation
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.
Summary
Raises the webapp's vitest coverage from 59.7% → 95.9% statements and wires an enforced 80% coverage threshold into
vite.config.jsso CI fails on regression.Changes
useSession,useStreamingOutput): full lifecycle tests (create/end/error/expiry/streaming, 1000-line cap, unmount cleanup).Login(render + navigate),Demo(mock mode, live mode, 503/429/404/409 errors, reset,getMockResponsebranches).Functions,Stack,Breakpoint,BreakPoints,MemoryMap,Threads): loading / error / no-session / fetch-success / fetch-error states.api.js: request interceptor (session_id injection) + response interceptor (404 → session-expiry callback) via a capture adapter.src/setupTests.js: stubElement.prototype.scrollIntoView(jsdom doesn't implement it; Demo's log panel calls it in an effect).vite.config.js: addcoverage.thresholds(statements/branches/lines 80, functions 75) so the existing CI coverage step gates on the target.Results
vite build: greenTest plan
npx vitest run --coverage— 115 pass, thresholds enforcednpx eslint src/— 0 errorsnpm run build— green