Waffle icon indicating copy to clipboard operation
Waffle copied to clipboard

Why does order of test files matter?

Open cryptofish7 opened this issue 3 years ago • 1 comments

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?

cryptofish7 avatar Apr 15 '21 03:04 cryptofish7

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.

wachulski avatar Apr 15 '21 21:04 wachulski