-
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
Update the tests to use the Promise-based API #1349
Update the tests to use the Promise-based API #1349
Commits on Jun 27, 2023
-
test: add test constructors for promise-based clients
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 3340ca4 - Browse repository at this point
Copy the full SHA 3340ca4View commit details -
test: add restTestOnJsonMsgpackAsync
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 1ca52a3 - Browse repository at this point
Copy the full SHA 1ca52a3View commit details -
test: convert rest auth tests to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 76a1e63 - Browse repository at this point
Copy the full SHA 76a1e63View commit details -
test: convert rest capability tests to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for af38ec8 - Browse repository at this point
Copy the full SHA af38ec8View commit details -
test: convert rest fallbacks tests to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for a1fb8dd - Browse repository at this point
Copy the full SHA a1fb8ddView commit details -
test: convert rest history tests to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 6d0d329 - Browse repository at this point
Copy the full SHA 6d0d329View commit details -
test: remove legacy rest history promise test
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for b07d032 - Browse repository at this point
Copy the full SHA b07d032View commit details -
test: convert rest http tests to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 24d299e - Browse repository at this point
Copy the full SHA 24d299eView commit details -
test: convert rest constructor tests to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for d40ea8f - Browse repository at this point
Copy the full SHA d40ea8fView commit details -
test: convert rest message tests to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 152f4e5 - Browse repository at this point
Copy the full SHA 152f4e5View commit details -
test: remove legacy rest message promise test
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 8b9e0f9 - Browse repository at this point
Copy the full SHA 8b9e0f9View commit details -
test: convert rest presence tests to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for d76a03f - Browse repository at this point
Copy the full SHA d76a03fView commit details -
test: remove legacy rest presence promise test
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 4ef4a98 - Browse repository at this point
Copy the full SHA 4ef4a98View commit details -
test: convert rest push tests to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 844af87 - Browse repository at this point
Copy the full SHA 844af87View commit details -
test: remove legacy rest push promise tests
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 469229b - Browse repository at this point
Copy the full SHA 469229bView commit details -
test: convert rest request tests to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 1e698e2 - Browse repository at this point
Copy the full SHA 1e698e2View commit details -
test: remove legacy rest request promise test
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for b694963 - Browse repository at this point
Copy the full SHA b694963View commit details -
test: convert rest stats tests to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for f882997 - Browse repository at this point
Copy the full SHA f882997View commit details -
test: remove legacy rest stats promise test
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 2448be7 - Browse repository at this point
Copy the full SHA 2448be7View commit details -
test: convert rest status test to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 44808ed - Browse repository at this point
Copy the full SHA 44808edView commit details -
test: remove legacy rest status promise test
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for e9081a3 - Browse repository at this point
Copy the full SHA e9081a3View commit details -
test: convert rest time test to Promise API
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for edcecfa - Browse repository at this point
Copy the full SHA edcecfaView commit details -
test: remove legacy rest time promise test
Co-authored-by: Lawrence Forooghian <lawrence@forooghian.com>
Configuration menu - View commit details
-
Copy full SHA for 6796bed - Browse repository at this point
Copy the full SHA 6796bedView commit details -
Configuration menu - View commit details
-
Copy full SHA for 17d2aaa - Browse repository at this point
Copy the full SHA 17d2aaaView commit details -
Configuration menu - View commit details
-
Copy full SHA for a36fe51 - Browse repository at this point
Copy the full SHA a36fe51View commit details -
Remove parts of test relating to setOptions calling its callback imme…
…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.
Configuration menu - View commit details
-
Copy full SHA for a1c3592 - Browse repository at this point
Copy the full SHA a1c3592View commit details -
Prepare realtime channel publish disallowed test for conversion to Pr…
…omise API When we switch to using the Promise-based API, we’ll need to wait for the result of `publish`, so let’s put the supporting code in place for that.
Configuration menu - View commit details
-
Copy full SHA for 050b95b - Browse repository at this point
Copy the full SHA 050b95bView commit details -
Update Realtime tests to use SDK’s Promise-based API
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.
Configuration menu - View commit details
-
Copy full SHA for 43a2d1d - Browse repository at this point
Copy the full SHA 43a2d1dView commit details -
Remove obsolete Promise-based Realtime tests
No longer needed as of 43a2d1d. I’ve kept the tests for EventEmitter (since, as mentioned in aforementioned commit, the main body of the tests uses the callback-based API), and also for init.test.js, which tests the result of `require('../../promises')`.
Configuration menu - View commit details
-
Copy full SHA for 45b9c3b - Browse repository at this point
Copy the full SHA 45b9c3bView commit details -
Remove "Promise" from name of Ably*Promise helpers
Thus replacing the (unused as of 6fe4914) callback versions.
Configuration menu - View commit details
-
Copy full SHA for d0f034e - Browse repository at this point
Copy the full SHA d0f034eView commit details