Skip to content

Warn or error when stubbing non-existent functions #234

Open
@tstackhouse

Description

@tstackhouse

This is great tool for writing my tests, however I've noticed that both with and without noCallThru(), if we stub a library and write out our test cases, if the underlying module methods then change, our test cases continue to work, even though the underlying methods have changed. The running code would obviously break, but the tests seems to behave just fine.

Would it be possible to warn or even fail when stubbing functions on require()'d modules that don't actually exist?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions