test(utils): isolate exists() tests from real filesystem#1982
test(utils): isolate exists() tests from real filesystem#1982asyncapi-bot merged 3 commits intoasyncapi:masterfrom
Conversation
|
What reviewer looks at during PR reviewThe following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.
|
📝 WalkthroughWalkthroughAdds a top-level Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@apps/generator/test/utils.test.js`:
- Line 58: Update the test description string in the unit test for URL handling:
change the it block title from 'doesnot work with a url' to 'does not work with
a url' in the test function (the it(...) around the URL test) so the description
reads correctly; no other behavior changes required.
Adi-204
left a comment
There was a problem hiding this comment.
@SHUBHANSHU602 left few comments
b3af625 to
ae0f469
Compare
|
|
/rtm |



Summary
This PR improves test isolation for
utils.exists()inapps/generator.Previously, the unit tests relied on the real filesystem (e.g., using
process.cwd()and actual files), which introduced environment dependency and broke determinism.Changes
fs.promises.statusingjest.spyOn.truefalseResult
Resolves #1873
Summary by CodeRabbit