test: add automated tests#5
Draft
paragon-review[bot] wants to merge 1 commit intomainfrom
Draft
Conversation
- Install vitest, @testing-library/react, @testing-library/jest-dom, @testing-library/user-event, jsdom as dev dependencies - Add react-router-dom as explicit dependency (was imported but missing from package.json) - Create vitest.config.ts with jsdom environment and asset mocking - Create src/test/setup.ts with jest-dom matchers - Create src/test/mocks/fileMock.ts for static asset imports - Add "test": "vitest run" script to package.json Test coverage: - App.test.tsx (6): route rendering for /, /intouchcx, /pillthought, /palkia, unknown routes, component validation - Home.test.tsx (5): smoke render, heading, portfolio grid, footer, social links - Intouch.test.tsx (6): smoke render, heading, skills list, back link, scroll-to-top, image error handler - PillThought.test.tsx (6): smoke render, heading, section headings, back link, footer, scroll-to-top - Palkia.test.tsx (8): smoke render, heading, sections, tech stack, back link, footer, video element, scroll-to-top Fix: Remove empty AboutProps interface in PillThought.tsx (lint error) Generated with Paragon Co-Authored-By: Paragon <support@polarity.cc>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
plan_id: add-test-suite-for-react-portfolio-app-f2a1a1
status: pending
version: 1
created: 2026-03-18T00:24:03Z
updated: 2026-03-18T00:24:03Z
decomposition: flat
replan_count: 0
Add test suite for React portfolio app
Summary
Install Vitest + Testing Library, fix missing
react-router-domdependency, and add component rendering + routing tests for all 5 page components. When complete,npm testruns a green suite covering all routes and components.Changes
vitest,@testing-library/react,@testing-library/jest-dom,@testing-library/user-event,jsdom,react-router-dom(missing explicit dep). Createvitest.config.tswith jsdom environment,src/test/setup.tsimporting jest-dom matchers. Add"test": "vitest run"topackage.jsonscripts. Files:package.json,vitest.config.ts,src/test/setup.ts,tsconfig.app.json(add test include)/,/intouch,/pillthought,/palkia) render correct components. Test that unknown paths don't crash. File:src/__tests__/App.test.tsxsrc/__tests__/Home.test.tsxsrc/__tests__/Intouch.test.tsxsrc/__tests__/PillThought.test.tsxsrc/__tests__/Palkia.test.tsxPalkia.tsx(missingreact/jsx-no-target-blankor similar) and remove unused eslint-disable directives across all filesVerification
cd my-portfolio && npm run buildcd my-portfolio && npx vitest runcd my-portfolio && npx eslint .(0 errors)Stats
12 files changed ·
+1698/-10Changes by directory
my-portfolio/All files changed
my-portfolio/package-lock.json(+1278/-4)my-portfolio/package.json(+9/-2)my-portfolio/src/PillThought.tsx(+1/-3)my-portfolio/src/__tests__/App.test.tsx(+88/-0)my-portfolio/src/__tests__/Home.test.tsx(+65/-0)my-portfolio/src/__tests__/Intouch.test.tsx(+72/-0)my-portfolio/src/__tests__/Palkia.test.tsx(+93/-0)my-portfolio/src/__tests__/PillThought.test.tsx(+68/-0)my-portfolio/src/test/mocks/fileMock.ts(+1/-0)my-portfolio/src/test/setup.ts(+1/-0)my-portfolio/tsconfig.app.json(+2/-1)my-portfolio/vitest.config.ts(+20/-0)