You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our main test script runs npm test scripts of all packages against the same instance of ganache-cli (with contracts deployed after start).
If some test suite doesn't manage snapshot correctly, another test suite can fail since the blockchain state isn't the expected one.
Another problem that can occur is related to the accounts that are shared between test suites: Nonce issues can occur if some test case doesn't handle that correctly.
An idea that could help to solve this issue is to start a ganache instance for each test suite, but it'll slow the test script a lot. @pcowgill any idea?
The text was updated successfully, but these errors were encountered:
Haha I was just typing what I think is the same idea you just posted!
"Are there any commands to restore ganache to its default starting state at the start of any test suite? That might be faster than starting a new ganache instance"
A fix to be made: Ensure that blockchain will be reverted to the correct snapshot beforeEach test case.
Now, when an exception occurs inside a hook and before revertFromSnapshot it's breaking the test suite and demands ganache-cli restarting.
Our main test script runs
npm test
scripts of all packages against the same instance ofganache-cli
(with contracts deployed after start).If some test suite doesn't manage snapshot correctly, another test suite can fail since the blockchain state isn't the expected one.
Another problem that can occur is related to the accounts that are shared between test suites: Nonce issues can occur if some test case doesn't handle that correctly.
An idea that could help to solve this issue is to start a
ganache
instance for each test suite, but it'll slow the test script a lot.@pcowgill any idea?
The text was updated successfully, but these errors were encountered: