Skip to content
Discussion options

You must be logged in to vote

Tests are executed in parallel, so you can't depend on order of test execution. (Note that individual runs of a fuzz test are run serially, however). You can use different contracts with different setUp() methods, or you can call test1() from within test2() to acquire its state, but this will result in test1 running twice.

Ideally your tests should be isolated and not dependent on each other, and having more than one assertEq per test is common 🙂

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jmhickman
Comment options

@mds1
Comment options

mds1 Aug 30, 2022
Maintainer

@mds1
Comment options

mds1 Aug 30, 2022
Maintainer

@jmhickman
Comment options

Answer selected by jmhickman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants