test(frontend): add vitest suite mirroring backend coverage#139
Draft
xishell wants to merge 2 commits into
Draft
test(frontend): add vitest suite mirroring backend coverage#139xishell wants to merge 2 commits into
xishell wants to merge 2 commits into
Conversation
Coverage Report for Frontend coverage (frontend)
File CoverageNo changed files found. |
Backend coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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
Brings the frontend up to backend test parity: a Vitest suite with shared fixtures, factories, and a coverage gate at 80%, plus a CI job that posts the coverage report on every PR.
Changes
src/**/__tests__/: 117 tests across pages,components, hooks, and lib helpers. Mirrors the backend layout where
every router has a
test_*_api.py.src/test/,setup.ts(jsdom + in-memoryWeb Storage shim that survives node 22's experimental localStorage),
helpers.tsx(renderWithAuthLayout,mockFetch, factories), andeventSource.ts(FakeEventSourcefor SSE-driven hooks).@vitest/coverage-v8with thresholdslines/statements/functions = 80,branches = 75. Local:bun run test:cov.frontend-vitestjob in.github/workflows/test.ymlusingdavelosert/vitest-coverage-report-action, posting a coverage commenton PRs and a step summary on every run.
Checklist