-
Notifications
You must be signed in to change notification settings - Fork 1
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
Improve tests #20
Improve tests #20
Conversation
WalkthroughThe recent updates bring improvements to error handling in the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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: 3
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
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: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- client.ts (1 hunks)
- client_test.ts (1 hunks)
- mod.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- client.ts
Additional comments not posted (8)
mod.ts (1)
1-1
: Change in export statement enhances modularity and control over exported entities.client_test.ts (7)
17-47
: Proper use of testing utilities and assertions in the "Client.reply" test case.
53-76
: Consistent and effective testing approach in the "Client.redraw" test case.
82-101
: Effective use of mocks and error handling in the "Client.ex" test case.
107-126
: Consistent testing methodology applied in the "Client.normal" test case.
132-209
: Comprehensive and detailed testing in the "Client.expr" test case, including advanced scenarios with multiple clients.
261-343
: Thorough testing of the "Client.call" method, effectively using mocks and handling errors.
349-372
: Appropriate testing of the "Client.callNoReply" method, correctly handling cases without responses.
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.
LGTM
@Milly Could you rebase to tidy commits? The PR includes test improvements and bug fix so I'd like to add merge commit rather than squash merge. |
I squashed the commits into units. |
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: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (9)
- .github/workflows/test.yml (1 hunks)
- client.ts (1 hunks)
- client_test.ts (1 hunks)
- deno.jsonc (1 hunks)
- example/client.vim (1 hunks)
- example/server.ts (1 hunks)
- mod.ts (1 hunks)
- session.ts (1 hunks)
- session_test.ts (7 hunks)
Files skipped from review as they are similar to previous changes (8)
- .github/workflows/test.yml
- client.ts
- deno.jsonc
- example/client.vim
- example/server.ts
- mod.ts
- session.ts
- session_test.ts
Additional comments not posted (9)
client_test.ts (9)
5-15
: Imports are correctly structured and use the latest versions of the libraries.
17-47
: The test setup and assertions in the "Client.reply" test case are correctly implemented, ensuring proper behavior verification.
49-76
: The "Client.redraw" test case is well-structured with appropriate use of testing utilities and correct assertions.
78-101
: The test case for "Client.ex" is correctly implemented, ensuring that both success and error scenarios are properly tested.
103-126
: The "Client.normal" test case is well-structured and effectively tests the method's functionality under different scenarios.
128-209
: The "Client.expr" test case is comprehensive, effectively testing multiple scenarios and client interactions.
211-255
: The "Client.exprNoReply" test case is correctly implemented, ensuring that the method's behavior is thoroughly tested.
257-343
: The "Client.call" test case is comprehensive and well-structured, effectively testing the method under various scenarios.
345-372
: The "Client.callNoReply" test case is correctly implemented, ensuring that the method's behavior is thoroughly tested.
Summary by CodeRabbit
Session
toSessionForClient
for clarity in client contexts.