Convert BaseResource.fetch to return a promise.

Review Request #11840 — Created Oct. 4, 2021 and submitted

Information

Review Board
master

Reviewers

This change updates the base resource model fetch operation to use
promises and async/await instead of callbacks.

  • Ran js-tests.
  • Manually tested various parts of the UI that rely on this.
Summary ID
Convert BaseResource.fetch to return a promise.
This change updates the base resource model `fetch` operation to use promises and async/await instead of callbacks. Testing Done: - Ran js-tests. - Manually tested various parts of the UI that rely on this.
1fb73e6ad9f92bf4f0ecb881655bcf5c78bc5a48
Description From Last Updated

Col: 19 'optional catch binding' is only available in ES10 (use 'esversion: 10').

reviewbotreviewbot

Jasmine has an expectAsync that supports things like toBeRejected(). I think we can use that here, maybe in other tests? …

chipx86chipx86

Col: 19 'optional catch binding' is only available in ES10 (use 'esversion: 10').

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 passed.
JSHint failed.

JSHint

chipx86
  1. 
      
  2. Show all issues

    Jasmine has an expectAsync that supports things like toBeRejected(). I think we can use that here, maybe in other tests? Seems it's in the version we ship.

  3. 
      
david
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (4ec4182)