`new Promise(` should be seen as a bridge, used only for interfacing with
asynchronicity that does not use promises. (Such as Nodebacks, setTimeout, or
older DOM interfaces.) Otherwise you can just return the promise and chain off
of it, or await it. (There are some other use cases, such as writ
I have seen that in Mocha tests, but this code looked different to me.
I'm looking at
https://github.com/google/traceur-compiler/blob/master/test/feature/AsyncFunctions/AlphaRenaming.js
.
I thought to use done in a Mocha test you have to have a parameter named
"done" in the test function.
I suppose
2 matches
Mail list logo