-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update test data with corrected action values #451
Update test data with corrected action values #451
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Coverage Report
File CoverageNo changed files found. |
5ae43d2
to
d2591a0
Compare
d2591a0
to
3f767af
Compare
test/core/helpers.test.ts
Outdated
@@ -9,10 +9,11 @@ import { DefaultReaction } from '../../src/core/reaction.js'; | |||
|
|||
const TEST_ENVELOPED_MESSAGE = { | |||
id: 'chat:6TP2sA:some-room:219f7afc614af7b:0', | |||
serial: '01719948956834-000@108TeGZDQBderu97202638', |
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.
We should probably omit the serial
here per the original test - it was because of the incorrect action
that it wasn't parsing it
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.
Done
3f767af
to
bd44c26
Compare
Set the action to `message.create` since the enums have changed.
bd44c26
to
8abbc1b
Compare
A race condition happens when we unmount the `usePresence` hook. Typically, we expect the unmounting to trigger a leave event, action by the caller through the `leaveClient()` func. What happens instead is, we unmount the component, which triggers the detach process (as we are unmounting the ChatProvider too). The `leaveClient()` races against this and loses, so when it finally executes, the channel state is now `detaching` and the function returns an error. Replaced `TestProvider` with a reusable `Providers` component so the hook and providers can be controlled separately. Updated tests to rerender `Providers` with dynamic children for better control over component lifecycle.
…esence-test Bugfix: Fix race condition in usePresence test
de558f4
into
chore/update-ably-package-version
Serial and created at fields were added to the test data since ably-js does not infer these from the version field.