Skip to content

Automatic restore for spyOn #2972

@jardakotesovec

Description

@jardakotesovec

As already mentioned in #1749, could spyOn have automatic restore as jasmine has?

It would help to isolate spies for given test, as its simple to forget to call the restore at the end of the test (and can affect the other tests which is always difficult to track down).

And also there is no guarantee that the restore will get called, because test might fail in some expect, which stops the execution of the test and prevents calling the restore, which is usually called at the end of the test function.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions