Convert BaseResource.save to return a promise.
Review Request #11642 — Created June 2, 2021 and submitted
This change updates the save machinery for various resources to use
promises and async/await instead of callbacks.
- Ran js-tests.
- Manually tested API token creation, comment editing, review request
field editing, post-commit review request creation, ship-it revocation,
and file attachment uploading.
Summary | ID |
---|---|
fe13a59893bbf8cdbb32a68242c9a9926c5d7ec9 |
Description | From | Last Updated |
---|---|---|
Col: 15 'commit' was used before it was defined. |
reviewbot | |
Col: 39 Missing semicolon. |
reviewbot | |
Does .and.resolveTo() work instead of having to explicitly return Promise.resolve()? |
chipx86 | |
Think this can be .and.rejectWith(new BackboneError(...)) |
chipx86 | |
, optional? |
chipx86 |
- Commits:
-
Summary ID 5aee07394f3cf72fb0a2595a8b585c0c10682b85 fe570fdcdea6875baaf88600256a4b6b2511b21f - Diff:
-
Revision 2 (+1978 -2068)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.
- Commits:
-
Summary ID fe570fdcdea6875baaf88600256a4b6b2511b21f 2a68656268cbc391c8a76116055c98b34de93d28 - Diff:
-
Revision 3 (+2418 -2198)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.
- Change Summary:
-
Use
expectAsync
- Commits:
-
Summary ID 2a68656268cbc391c8a76116055c98b34de93d28 3a7c5d1c2b30161af04cc48196b0a352156dac62 - Diff:
-
Revision 4 (+2402 -2198)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.
-
Looks good. There's some Jasmine stuff we can probably use for making spies that resolve/reject. Only highlighted one instance of each.
Doesn't have to be a blocker for this change.
-
-
-
- Commits:
-
Summary ID 3a7c5d1c2b30161af04cc48196b0a352156dac62 fe13a59893bbf8cdbb32a68242c9a9926c5d7ec9 - Diff:
-
Revision 5 (+2324 -2186)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.