TrueFiEng / Waffle

Library for writing and testing smart contracts.
https://getwaffle.io
MIT License
960 stars 162 forks source link

Why does order of test files matter? #488

Open cryptofish7 opened 3 years ago

cryptofish7 commented 3 years ago

So I'm playing around with sushiswap's contracts and I noticed that the order the test files are run matter. I found this because I'm renaming sushiswap's contracts.

For example, if i just run yarn test, then if SushiMaker.test.ts is run before MasterChef.test.ts, then MasterChef test fails. However, if you run MasterChef.test.ts on its own, it passes just fine.

I was under the assumption that state is reset between each test file. Seems like this is not the case?

wachulski commented 3 years ago

There are known issues when it matters unfortunately. See #382 for example. Please also provide more details, e.g. error messages, expected vs actual etc.