test(Tasks): Add Priority tests with shared test utilities#461
test(Tasks): Add Priority tests with shared test utilities#461ShivaGupta-14 wants to merge 1 commit intoCCExtractor:mainfrom
Conversation
|
Thank you for opening this PR! Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools. Please take a moment to:
More information on how to conduct a self review: This helps make the review process smoother and gives us a clearer understanding of your thought process. Once you've added your self-review, we'll continue from our side. Thank you! |
There was a problem hiding this comment.
shared mocks and test data for tests, will add more utilities as we add more test files (Recur, Reports, etc.)
There was a problem hiding this comment.
updated testMatch to only pick up .test.tsx or .spec.tsx files, prevents setup.tsx and helper.ts as test files
There was a problem hiding this comment.
reusable helper functions like opening dialogs and clicking edit buttons, keeps test code DRY and readable
ShivaGupta-14
left a comment
There was a problem hiding this comment.
self review done, open to suggestions and changes as needed
| export const selectMock = { | ||
| Select: ({ children, onValueChange, value }: any) => ( | ||
| <select | ||
| data-testid="project-select" |
There was a problem hiding this comment.
test-id as per your suggestion
c3d28d4 to
2bb7958
Compare
Description
add Priority test
create shared test-utils (setup.tsx, helper.ts) for reuse
update jest.config.cjs testMatch to exclude non-test files
Tracking: Tracking Issue: Tasks Component Test Improvements #433
Checklist
npx prettier --write .(for formatting)gofmt -w .(for Go backend)npm test(for JS/TS testing)