-
-
Notifications
You must be signed in to change notification settings - Fork 725
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
feat: increase code coverage #3517
Changes from 1 commit
b5cbb95
facaa13
0c5d9d7
e2c7808
c863f71
6289c28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -195,4 +195,9 @@ describe('GitHub Discussions Processing', () => { | |||||||||||||||
localConsoleErrorSpy.mockRestore(); | ||||||||||||||||
}); | ||||||||||||||||
|
||||||||||||||||
it('should handle write failures gracefully', async () => { | ||||||||||||||||
|
||||||||||||||||
await expect(writeToFile).rejects.toThrow(); | ||||||||||||||||
}); | ||||||||||||||||
|
||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Ensure the test invocation covers the function call. Your test awaits - await expect(writeToFile).rejects.toThrow();
+ await expect(writeToFile()).rejects.toThrow(); Also, remove extra blank lines for compliance with the style guide. 📝 Committable suggestion
Suggested change
🧰 Tools🪛 eslint[error] 199-200: Delete (prettier/prettier) [error] 201-202: Delete (prettier/prettier) |
||||||||||||||||
}); |
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.
Can we add a test that enters this
if
clause?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.
Yes, added a test for it