We want to be able to have anything that the JavaScrit runtime can await be a valid argument to an expect().resolves or expect().rejects expression. Currently however, it will only work for instances of the builtin Promise constructor.
This replaces the instanceof check with a check for a then() function.
We want to be able to have anything that the JavaScrit runtime can
await
be a valid argument to anexpect().resolves
orexpect().rejects
expression. Currently however, it will only work for instances of the builtinPromise
constructor.This replaces the
instanceof
check with a check for athen()
function.