Skip to content

Implement fixture for improved testing #7

Open
@bitbeckers

Description

@bitbeckers

Issue
Since test cases influence contract/wallet state, we've added some quick cleanups within the test cases. This also means not all tests run independently (e.g. deposit and withdraw).

To speed up testing, make testing more flexible and be able to do quick state management, we want to implement fixtures.

For instance, since we already create a commitment in an earlier testcase, a subsequent call to create a commitment in another test case is rejected since there is already an active commitment for the user. To clear up that commitment we should be able to manually close is (not an implemented feature) or use and additional user/wallet. A fixture would quickly reset state and prevent this.

Reference
https://ethereum-waffle.readthedocs.io/en/latest/fixtures.html

Expected outcome

  1. Test cases start with calling the fixture for a quick state reset

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions