feat(frontend): add Jest unit testing infrastructure#6432
Merged
talissoncosta merged 15 commits intomainfrom Jan 20, 2026
Merged
feat(frontend): add Jest unit testing infrastructure#6432talissoncosta merged 15 commits intomainfrom
talissoncosta merged 15 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ef6d2cb to
0635372
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6432 +/- ##
=======================================
Coverage 98.09% 98.09%
=======================================
Files 1293 1293
Lines 46610 46610
=======================================
Hits 45722 45722
Misses 888 888 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Zaimwa9
reviewed
Dec 19, 2025
Contributor
Docker builds report
|
Zaimwa9
reviewed
Dec 31, 2025
Contributor
Zaimwa9
left a comment
There was a problem hiding this comment.
Just adding a prop and to the deploy to production pipeline and should be good to go. Thanks for the initiative!
Base automatically changed from
revert-6428-revert-6361-refactor/migrate-critical-components-featurespagejs-2
to
main
January 5, 2026 14:20
0876e33 to
0947abc
Compare
Remove 12 functions from Format that are not used anywhere in the codebase: - age, ago, countdown, countdownMinutes (time-relative) - cssImage, dateAndTime, monthAndYear, time (formatting) - initialAndLastName, money, ordinal, removeAccents (misc) Also removes their corresponding tests. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The setup file was only needed for global Utils when testing removeAccents and countdown functions, which have been removed as dead code. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Zaimwa9
previously approved these changes
Jan 20, 2026
Zaimwa9
approved these changes
Jan 20, 2026
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
Add Jest unit testing infrastructure to the frontend codebase to enable fast, isolated unit tests alongside the existing TestCafe E2E tests.
Closes #6442
Changes
Jest Configuration
ts-jestpreset for TypeScript supportcommon/,components/,project/)common/andweb/directoriestsconfig.jest.jsonwithjsx: reactfor parsing TSX files in testsCI/CD Integration
frontend-pull-request.yml)frontend-deploy-production.yml--passWithNoTestsflag to prevent failures if tests are accidentally deletedInitial Test Coverage
featureFilterParamsutilitybuildUrlParams,buildApiFilterParams,getFiltersFromParams,hasActiveFiltersformatutilityshortenNumber,nearestTen,camelCase,enumeration,fullName,truncateText,trimAndHighlightSpaces,userDisplayNameformat.jsto TypeScript (format.ts) with proper type annotationsDead Code Removal
format.ts:removeAccents,countdown,ago,initialAndLastName,ordinal,money,cssImage,objectEqual,countDp,age,bytesToMB,bytesToSizeTest Style
it.eachwith tagged template literals for table-driven testsDependencies Added
jest,ts-jest,@types/jestKnown Issues (Out of Scope)
These are pre-existing behaviours documented by tests, not introduced by this PR:
fullName({ firstName: 'kyle' })returns'Kyle 'with trailing space - existing behaviour, fix in future PRHow did you test this code?
cd frontend npm run test:unitAll 71 tests pass.
Checklist
docs/if required so people know about the feature!