Skip to content

Resolves and rejects functions are not implemented on properties #97

Description

@notanengineercom

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions