feat: added ComparisonStatsCard component and test suite (#1510)#1885
feat: added ComparisonStatsCard component and test suite (#1510)#1885tamoghnodeb wants to merge 1 commit into
Conversation
|
@optiondefault is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
👋 Hey @tamoghnodeb, welcome to CommitPulse! 🎉 Thanks for opening your first pull request — this is a big deal and we appreciate the effort! While you wait for a review, please double-check:
A maintainer will review your PR shortly. Hang tight! 🚀 |
|
🚨 Hey @tamoghnodeb, the CI Pipeline is failing on this PR and it has been marked as Please fix the issues before this can be reviewed. Here's how: 1. Run checks locally before pushing: npm run format:check # Check Prettier formatting
npm run lint # Run ESLint
npm run typecheck # TypeScript type check
npm run test # Run unit tests (Vitest)
npm run build # Verify production build passes2. Auto-fix common issues: npm run format # Auto-fix formatting with Prettier
npm run lint -- --fix # Auto-fix lint errors where possible3. Check the full failure log here: Once you push a fix and the CI passes, the |
|
The two CI failures are caused by pre-existing issues in the upstream main branch that are unrelated to this PR: lib/github.test.ts:356 — TypeScript error: Property 'totalContributions' does not exist on type 'ExtendedContributionData' (type was renamed in main but the test file was not updated) All 1009 tests pass locally across 72 test files. This PR only adds components/dashboard/ComparisonStatsCard.tsx, components/dashboard/ComparisonStatsCard.test.tsx, vitest.setup.ts, and updates vitest.config.ts. Happy to rebase once main is fixed. |
Description
Created the
ComparisonStatsCardUI component to display dynamic growth metrics (positive/negative/neutral trends). Additionally, implemented a robust 12-test suite in Vitest and configuredvitest.config.tsto properly route.test.tsxfiles to thejsdomenvironment.Fixes #1510
Pillar
Visual Preview
N/A — This PR focuses on a UI component structure and a Vitest testing suite. All 1009 tests pass locally.
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.