Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement fixture for improved testing #7

Open
bitbeckers opened this issue Sep 29, 2020 · 0 comments
Open

Implement fixture for improved testing #7

bitbeckers opened this issue Sep 29, 2020 · 0 comments
Labels
good first issue Good for newcomers

Comments

@bitbeckers
Copy link
Member

bitbeckers commented Sep 29, 2020

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
@bitbeckers bitbeckers added the good first issue Good for newcomers label Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant