-
Notifications
You must be signed in to change notification settings - Fork 531
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
test(presence): Add snapshot tests for submitted signals #23048
base: main
Are you sure you want to change the base?
Conversation
Copilot
AI
left a comment
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.
Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 suggestions.
Files not reviewed (2)
- packages/framework/presence/package.json: Language not supported
- packages/framework/presence/src/test/snapshots/notificationsManager.vitest.ts.snap: Language not supported
Comments skipped due to low confidence (2)
packages/framework/presence/src/notificationsManager.ts:182
- The use of 'any' for 'eventName' might introduce unintended behavior. Ensure that the types are consistent and consider resolving the typing issues without using 'any'.
const eventName: any = value.value.name;
packages/framework/presence/src/notificationsManager.ts:183
- The use of 'Parameters<NotificationSubscriptions[any]>' for 'eventArgs' might introduce unintended behavior. Ensure that the types are consistent and consider resolving the typing issues without using 'any'.
const eventArgs = value.value.args as Parameters<NotificationSubscriptions<T>[any]>;
Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more
// @ts-expect-error TODO | ||
createEmitter<NotificationSubscriptions<T>>(); | ||
|
||
// @ts-expect-error TODO |
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.
The '@ts-expect-error' comment indicates a suppressed typing error. Investigate if this typing error can be resolved properly instead of being suppressed.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
// @ts-expect-error TODO | ||
createEmitter<NotificationSubscriptions<T>>(); | ||
|
||
// @ts-expect-error TODO |
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.
The '@ts-expect-error' comment indicates a suppressed typing error. Investigate if this typing error can be resolved properly instead of being suppressed.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
// @ts-expect-error TODO | ||
createEmitter<NotificationSubscriptions<T>>(); | ||
|
||
// @ts-expect-error TODO |
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.
The '@ts-expect-error' comment indicates a suppressed typing error. Investigate if this typing error can be resolved properly instead of being suppressed.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
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.
Code Coverage Summary
↓ packages.framework.presence.src:
Line Coverage Change: -10.93% Branch Coverage Change: -55.48%
Metric Name | Baseline coverage | PR coverage | Coverage Diff |
---|---|---|---|
Branch Coverage | 84.05% | 28.57% | ↓ -55.48% |
Line Coverage | 62.58% | 51.65% | ↓ -10.93% |
Baseline commit: 9f60ea3
Baseline build: 305751
Happy Coding!!
Code coverage comparison check failed!!
More Details: Readme
- Skip This Check!!
What to do if the code coverage check fails:
-
Ideally, add more tests to increase the code coverage for the package(s) whose code-coverage regressed.
-
If a regression is causing the build to fail and is due to removal of tests, removal of code with lots of tests or any other valid reason, there is a checkbox further up in this comment that determines if the code coverage check should fail the build or not. You can check the box and trigger the build again. The test coverage analysis will still be done, but it will not fail the build if a regression is detected.
-
Unchecking the checkbox and triggering another build should go back to failing the build if a test-coverage regression is detected.
-
You can check which lines are covered or not covered by your tests with these steps:
- Go to the PR ADO build.
- Click on the link to see its published artifacts. You will see an artifact named
codeCoverageAnalysis
, which you can expand to reach to a particular source file's coverage html which will show which lines are covered/not covered by your tests. - You can also run different kind of tests locally with
:coverage
tests commands to find out the coverage.
Adds a mock ephemeral runtime that snapshots each signal submitted through it. The idea is to use these snapshots to verify the correct signals are submitted in the correct order.