-
Notifications
You must be signed in to change notification settings - Fork 55
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
Bring whenState
in line with spec
#1640
Merged
lawrence-forooghian
merged 5 commits into
integration/v2
from
1597-implement-whenState-spec
Mar 6, 2024
Merged
Bring whenState
in line with spec
#1640
lawrence-forooghian
merged 5 commits into
integration/v2
from
1597-implement-whenState-spec
Mar 6, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
temporarily deployed
to
staging/pull/1640/features
February 27, 2024 13:33
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1640/bundle-report
February 27, 2024 13:34
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1640/typedoc
February 27, 2024 13:34
Inactive
lawrence-forooghian
force-pushed
the
1597-implement-whenState-spec
branch
from
February 28, 2024 11:46
88ee9f2
to
879533e
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1640/features
February 28, 2024 11:46
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1640/bundle-report
February 28, 2024 11:47
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1640/typedoc
February 28, 2024 11:47
Inactive
lawrence-forooghian
changed the title
1597 implement when state spec
Bring Feb 28, 2024
whenState
in line with spec
VeskeR
requested changes
Mar 6, 2024
lawrence-forooghian
force-pushed
the
1597-implement-whenState-spec
branch
from
March 6, 2024 13:19
879533e
to
2d00596
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1640/bundle-report
March 6, 2024 13:20
Inactive
lawrence-forooghian
force-pushed
the
1597-implement-whenState-spec
branch
from
March 6, 2024 13:21
2d00596
to
bec7527
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1640/bundle-report
March 6, 2024 13:22
Inactive
VeskeR
approved these changes
Mar 6, 2024
I think that onceOrIfAfter was the original name for whenState, but 5d05530 forgot to update the test name accordingly.
Missed this in 7c465d6. I’ve had to remove the assertion from channelattachWhenState which checks that whenState calls its listener immediately, because there’s no easy way to check for this (because promise listeners are always invoked asynchronously and there’s no way to synchronously check whether a promise is pending).
Until spec commit d5e8fc6, these methods were exclusive to ably-js and were not tested. This commit brings the ably-js implementations in line with the aforementioned spec commit and tests that they conform to the spec. Documentation based on sdk-api-reference commit 4a06b46. Note the addition of the async/await adaptations of closeAndFinish and monitorConnection. These new tests are the first realtime tests that we’ve written on the v2 branch — i.e. since we dropped support for the callbacks API, and so I’ve written them using async/await properly instead of the whenPromiseSettles stopgap solution of 43a2d1d. Hence the new helper methods.
lawrence-forooghian
force-pushed
the
1597-implement-whenState-spec
branch
from
March 6, 2024 16:55
bec7527
to
b2b98eb
Compare
This was referenced May 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates the
whenState
methods to conform to ably/specification#183. See commit messages for more details.Resolves #1597.
https://ably.atlassian.net/browse/ECO-4662