-
Notifications
You must be signed in to change notification settings - Fork 56
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 all tests to use the Promise API #1213
Labels
testing
Includes all kinds of automated tests, the way that we run them and the infrastructure around them.
Comments
➤ Automation for Jira commented: The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3554 |
lawrence-forooghian
added a commit
that referenced
this issue
Jun 20, 2023
I won't make any changes to `once` or `whenState` because we want to keep them TODO remove specific Promise tests TODO what is Ably.Realtime vs Ably.Realtime.Promise and have I converted properly? I think these might only be direclty used in the init and api tests TODO what about uncaught promises TODO a better name for ptcb Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 20, 2023
I won't make any changes to `once` or `whenState` because we want to keep them TODO remove specific Promise tests TODO what is Ably.Realtime vs Ably.Realtime.Promise and have I converted properly? I think these might only be direclty used in the init and api tests TODO what about uncaught promises TODO a better name for ptcb Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 20, 2023
I won't make any changes to `once` or `whenState` because we want to keep them TODO remove specific Promise tests TODO what is Ably.Realtime vs Ably.Realtime.Promise and have I converted properly? I think these might only be direclty used in the init and api tests TODO what about uncaught promises TODO a better name for ptcb Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 20, 2023
I won't make any changes to `once` or `whenState` because we want to keep them TODO remove specific Promise tests TODO what is Ably.Realtime vs Ably.Realtime.Promise and have I converted properly? I think these might only be direclty used in the init and api tests TODO what about uncaught promises TODO a better name for ptcb TODO remove the SkippingError Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 20, 2023
I won't make any changes to `once` or `whenState` because we want to keep them TODO remove specific Promise tests TODO what is Ably.Realtime vs Ably.Realtime.Promise and have I converted properly? I think these might only be direclty used in the init and api tests TODO what about uncaught promises TODO a better name for ptcb TODO remove the SkippingError Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 20, 2023
…diately As part of #1213, I’ll be updating this test to use the Promise-based API, to which the concept of "calls the callback before returning" can’t be detected, since the JavaScript engine always calls Promise callbacks asynchronously.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 20, 2023
I won't make any changes to `once` or `whenState` because we want to keep them TODO remove specific Promise tests TODO what is Ably.Realtime vs Ably.Realtime.Promise and have I converted properly? I think these might only be direclty used in the init and api tests TODO what about uncaught promises TODO a better name for ptcb TODO remove the SkippingError Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 20, 2023
I won't make any changes to `once` or `whenState` because we want to keep them TODO remove specific Promise tests TODO what is Ably.Realtime vs Ably.Realtime.Promise and have I converted properly? I think these might only be direclty used in the init and api tests TODO what about uncaught promises TODO a better name for ptcb TODO remove the SkippingError Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 20, 2023
…diately As part of #1213, I’ll be updating this test to use the Promise-based API, to which the concept of "calls the callback before returning" can’t be detected, since the JavaScript engine always calls Promise callbacks asynchronously.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 20, 2023
I won't make any changes to `once` or `whenState` because we want to keep them TODO remove specific Promise tests TODO what is Ably.Realtime vs Ably.Realtime.Promise and have I converted properly? I think these might only be direclty used in the init and api tests TODO what about uncaught promises TODO a better name for ptcb TODO remove the SkippingError Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 20, 2023
…diately As part of #1213, I’ll be updating this test to use the Promise-based API, to which the concept of "calls the callback before returning" can’t be detected, since the JavaScript engine always calls Promise callbacks asynchronously.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 20, 2023
I won't make any changes to `once` or `whenState` because we want to keep them TODO remove specific Promise tests TODO what is Ably.Realtime vs Ably.Realtime.Promise and have I converted properly? I think these might only be direclty used in the init and api tests TODO what about uncaught promises TODO a better name for ptcb TODO remove the SkippingError Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 21, 2023
…diately As part of #1213, I’ll be updating this test to use the Promise-based API, to which the concept of "calls the callback before returning" can’t be detected, since the JavaScript engine always calls Promise callbacks asynchronously.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 21, 2023
I won't make any changes to `once` or `whenState` because we want to keep them TODO remove specific Promise tests TODO what about uncaught promises TODO a better name for ptcb TODO introduce a promise-based variant of generateRandomKey Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 21, 2023
…diately As part of #1213, I’ll be updating this test to use the Promise-based API, to which the concept of "calls the callback before returning" can’t be detected, since the JavaScript engine always calls Promise callbacks asynchronously.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 21, 2023
I won't make any changes to `once` or `whenState` because we want to keep them TODO remove specific Promise tests TODO what about uncaught promises TODO a better name for ptcb TODO introduce a promise-based variant of generateRandomKey Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 22, 2023
I’ve chosen to do this with the lightest touch possible — that is, maintaining the tests’ callback-based approach and simply bridging the SDK’s Promise-based API back to callbacks. I did this for the sake of reviewability and not accidentally changing the behaviour of the tests in some subtle way that I’d then have to put time into understanding. It would be good to, at some point, update the structure of the tests to use `async` / `await`, to improve readability and to make them reflect how the users actually interact with the Promise-based API in the real world. I’ve split out into the separate task #1348. Note that I haven’t made any changes to the calls to EventEmitter’s `once` or `whenState` methods — we’re going to keep the callback-based versions of those methods, since there is no Promise equivalent of being able to turn them off using `off`. TODO remove specific Promise tests Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 22, 2023
I’ve chosen to do this with the lightest touch possible — that is, maintaining the tests’ callback-based approach and simply bridging the SDK’s Promise-based API back to callbacks. I did this for the sake of reviewability and not accidentally changing the behaviour of the tests in some subtle way that I’d then have to put time into understanding. It would be good to, at some point, update the structure of the tests to use `async` / `await`, to improve readability and to make them reflect how the users actually interact with the Promise-based API in the real world. I’ve split out into the separate task #1348. Note that I haven’t made any changes to the calls to EventEmitter’s `once` or `whenState` methods — we’re going to keep the callback-based versions of those methods, since there is no Promise equivalent of being able to turn them off using `off`. Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 27, 2023
…diately As part of #1213, I’ll be updating this test to use the Promise-based API, to which the concept of "calls the callback before returning" can’t be detected, since the JavaScript engine always calls Promise callbacks asynchronously.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 27, 2023
I’ve chosen to do this with the lightest touch possible — that is, maintaining the tests’ callback-based approach and simply bridging the SDK’s Promise-based API back to callbacks. I did this for the sake of reviewability and not accidentally changing the behaviour of the tests in some subtle way that I’d then have to put time into understanding. It would be good to, at some point, update the structure of the tests to use `async` / `await`, to improve readability and to make them reflect how the users actually interact with the Promise-based API in the real world. I’ve split out into the separate task #1348. Note that I haven’t made any changes to the calls to EventEmitter’s `once` or `whenState` methods — we’re going to keep the callback-based versions of those methods, since there is no Promise equivalent of being able to turn them off using `off`. Resolves #1213.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 27, 2023
…diately As part of #1213, I’ll be updating this test to use the Promise-based API, to which the concept of "calls the callback before returning" can’t be detected, since the JavaScript engine always calls Promise callbacks asynchronously.
lawrence-forooghian
added a commit
that referenced
this issue
Jun 27, 2023
I’ve chosen to do this with the lightest touch possible — that is, maintaining the tests’ callback-based approach and simply bridging the SDK’s Promise-based API back to callbacks. I did this for the sake of reviewability and not accidentally changing the behaviour of the tests in some subtle way that I’d then have to put time into understanding. It would be good to, at some point, update the structure of the tests to use `async` / `await`, to improve readability and to make them reflect how the users actually interact with the Promise-based API in the real world. I’ve split out into the separate task #1348. Note that I haven’t made any changes to the calls to EventEmitter’s `once` or `whenState` methods — we’re going to keep the callback-based versions of those methods, since there is no Promise equivalent of being able to turn them off using `off`. Resolves #1213.
Resolved by #1349. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
testing
Includes all kinds of automated tests, the way that we run them and the infrastructure around them.
[Self explanatory]
The text was updated successfully, but these errors were encountered: