test: Add comprehensive tests for ExportTasks component#306
test: Add comprehensive tests for ExportTasks component#306its-me-abhishek merged 1 commit intoCCExtractor:mainfrom
Conversation
Implements test coverage for exportTasksAsJSON and exportTasksAsTXT functions. Tests cover file download functionality, blob creation, error handling for empty tasks, and proper content formatting for both JSON and TXT export formats.
|
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! |
|
hey @its-me-abhishek ,PR for ExportTasks component is ready plss take a look when you feel free. thanks .! |
Hell1213
left a comment
There was a problem hiding this comment.
Added test coverage for ExportTasks component by creating ExportTasks.test.tsx file. Tests cover both exportTasksAsJSON and exportTasksAsTXT functions with proper browser API mocking for file downloads. Implementation focuses on validating actual export functionality and error handling for empty task scenarios.
Added comprehensive test coverage for ExportTasks component functions that handle task export functionality. Created ExportTasks.test.tsx with 12 test cases covering both JSON and TXT export formats. Tests validate file download mechanics, content formatting, and error handling for empty task scenarios.
Contributes : #299
Checklist
npx prettier --write .(for formatting)-[x] Ran
gofmt -w .(for Go backend)npm test(for JS/TS testing)Additional Notes
Single test file added with proper browser API mocking for DOM manipulation, URL object creation, and Blob handling. Tests focus on actual export behavior validation without modifying existing functionality. Export features are accessible through navbar dropdown menu.
Screenshots:
