On an interfece like:
interface Calculator {
model: Promise<string>;
}
We have both the resolves() and rejects() methods available by the typings, but when running real code, we are returning the proxy instead of the resolved or reject value.
const calculator = Substitute.for<Calculator>();
calculator.model.resolves('Casio FX-82');
console.log(await calculator.model); // [Function: SubstituteJS] -> then
On an interfece like:
We have both the
resolves()andrejects()methods available by the typings, but when running real code, we are returning the proxy instead of the resolved or reject value.