PR 1: Add Vitest test infrastructure for frontend#409
Merged
Conversation
Agent-Logs-Url: https://github.com/AvaCodeSolutions/django-email-learning/sessions/fe3c9f39-26b1-4e6d-8776-79cb87a86c02 Co-authored-by: payamnj <11951509+payamnj@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
payamnj
May 5, 2026 11:38
View session
Contributor
|
@copilot can you also add running these frontend tests in the .github/workflows/pr-check? |
Agent-Logs-Url: https://github.com/AvaCodeSolutions/django-email-learning/sessions/de479970-bd8b-498d-94a4-987435ff1162 Co-authored-by: payamnj <11951509+payamnj@users.noreply.github.com>
Contributor
Author
Done in e133c74. Added a
|
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.
No test runner or tooling existed for the React frontend. This PR bootstraps the full test infrastructure that all subsequent component test PRs depend on.
Changes
Dependencies
vitest,@testing-library/react,@testing-library/jest-dom,@testing-library/user-event,jsdomas devDependenciestestandtest:watchscripts topackage.jsonvitest.config.jssrc/test/setup.jsfetch,localStorage,window.matchMedia,document.cookie, logo PNG asset imports (required by MUI + MenuBar)beforeEachsrc/test/test-utils.jsxrenderWithProviders(ui, options)— wraps any component withThemeContextProvider+AppContext, with sensible defaults matching the production shapeuseAppContextre-exported for use in test probes without triggeringcreateRootside-effects fromrender.jsxsrc/test/smoke.test.jsx.github/workflows/pr-check.ymlfrontend-testjob that runs on every PR using Node 20, installs dependencies withnpm ci, and executesnpm test(Vitest)contents: readpermissions