You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usually, when we write async stuff in specs we do something like this:
The steps to do a foopy are given by the following algorithm. The algorithm runs asynchronously and returns a Promise:
Let p be a newly-created promise.
Return p and run the remaining steps asynchronously.
If the foopy is not bary enough, then:
3.1. Let e be a new Error...
3.2. Reject p with e
Resolve p with a new Baz
In the examples given in the spec writing guide, step 2 is omitted. Is this on purpose? Or is doing something like 2. wrong and specs should be written differently?