Skip to content

flushPendingTestArtifacts should reset the view #8

@Richard-Gist

Description

@Richard-Gist

Calling flushPendingTestArtifacts could have a flag to fully reset the main window to an empty view controller. Right now, if I call UIViewController.flushPendingTestArtifacts() in my setUp and tearDown for my tests does not guarantee that my environment is in a clean state for the next test.

This bit me when my controller I had been testing had calls to a dependency in the viewWillDisappear which then executed while running another test that was expecting to be the only one calling that dependency.

Right now my workaround is to do:

UIViewController.flushPendingTestArtifacts()
UIViewController().loadForTesting()

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