Skip to content

Improve e2e tests to ensure they always clean up as good as possible #44

@tbinna

Description

@tbinna

The current implementation of e2e tests contains cleanup code at the end of the tests. This is not ideal because if there is any exception thrown in a test, execution will stop, and the cleanup code never runs.

We should try to extract this code into a "finally" construct that always runs if we have anything to clean up. I believe (to be confirmed) tests within a Jest suite run sequentially. This means we could probably maintain a "test context" state on the test suite level that includes apps to be uninstalled and/or deleted after the test. A Jest afterEach block should then clean up whatever there is to clean up after each test and reset the test context.

// Clean up the registered app

// Clean up the registered app

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions