-
-
Notifications
You must be signed in to change notification settings - Fork 883
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
tests for src/lib/resolvers/Subscription/messageSentToGroupChat.ts
#1095
Conversation
@KrutikaBhatt Please refer to the PR_GUIDELINES.md document in the root folder of the repo. It tells you how to automatically close your issue when the PR is merged. |
Yes, sure! Will follow |
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.
Why package-lock.json is removed ? @KrutikaBhatt
No, it shouldn't be removed; it might be edited by mistake. I will make the changes |
Codecov Report
@@ Coverage Diff @@
## develop #1095 +/- ##
===========================================
+ Coverage 94.70% 95.01% +0.31%
===========================================
Files 165 165
Lines 9889 9891 +2
Branches 802 805 +3
===========================================
+ Hits 9365 9398 +33
+ Misses 523 492 -31
Partials 1 1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@noman2002, I have covered the remaining branch also. The code coverage is shown below - |
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.
package-lock.json is still not restored. please restore.
I just copied the package-lock.json from main file. I will just create a new pull request with the same tests. to avoid any problems with package-lock.json |
I am closing this PR. The same tests are covered in new PR - #1113 |
What kind of change does this PR introduce?
Issue Number: #889
Fixes #889
Description:
Written tests for messageSentToGroupChat subscription by creating a mock test GroupChat Message.
Did you add tests for your changes? : Yes
Snapshots/Videos:
The coverage obtained is 100%
Other information
The subscription uses
withFilter
which has a filter function parameter that returns true if the user in the GroupChat is currentUser. The code block is the same just converted into a separate function for testing and used in the subscriptionHave you read the contributing guide? Yes