-
Notifications
You must be signed in to change notification settings - Fork 583
docs: Add note about Jest warning after frontend tests #1137 #1143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Added documentation explaining that the 'Jest did not exit one second after the test run' warning is harmless when all tests pass. This helps new contributors understand the warning is expected behavior and not an indication of a problem. Fixes AOSSIE-Org#1137
📝 WalkthroughWalkthroughAdded a note to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @rahulharpal1603, I have raised a PR for this issue implementing the documentation for the Jest warning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@CONTRIBUTING.md`:
- Around line 68-69: Update the "Jest did not exit one second after the test run
has completed." paragraph in CONTRIBUTING.md to state that Jest reports "open
handles" (which can be unclosed servers, DB connections, sockets, timers, or
file watchers) that keep the Node process alive, that this can indicate resource
leaks and should be investigated rather than ignored, and add guidance to run
"npx jest --detectOpenHandles" and to close resources in test teardown (use
afterEach/afterAll) to fix the root cause.
🧹 Nitpick comments (1)
CONTRIBUTING.md (1)
67-69: Consider linking to additional context.To provide contributors with more information if they want to investigate further, you could optionally add a reference to issue
#1137or Jest's documentation about async operations.📚 Optional enhancement with reference link
> **Note:** After running the frontend tests, you may see a warning: > `Jest did not exit one second after the test run has completed.` -> This is a known behavior and **does not indicate a problem** when all tests pass. It occurs due to async handles that Jest detects but doesn't affect test results or application functionality. +> This is a known behavior and **does not indicate a problem** when all tests pass. It occurs due to async handles that Jest detects but doesn't affect test results or application functionality. See [issue `#1137`](https://github.com/AOSSIE-Org/PictoPy/issues/1137) for more details.
- Changed 'async handles' to 'open handles' for accuracy - Added examples of open handles (unclosed servers, DB connections, timers) - Added npx jest --detectOpenHandles command for debugging - Mentioned proper resource cleanup in afterEach/afterAll Addresses code review feedback
Description
Added documentation explaining that the "Jest did not exit one second after the test run" warning is harmless when all tests pass.
This helps new contributors understand the warning is expected behavior and not an indication of a problem.
Changes Made
Files Affected
CONTRIBUTING.mdFixes #1137
Summary by CodeRabbit