Convert BaseResource.fetch to return a promise.

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

david
Review Board
master
reviewboard

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
Convert BaseResource.fetch to return a promise.
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. 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
Review request changed
Loading...