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

Unexpected behaviour of fixture loaders #303

Open
pdyraga opened this issue May 18, 2022 · 0 comments
Open

Unexpected behaviour of fixture loaders #303

pdyraga opened this issue May 18, 2022 · 0 comments

Comments

@pdyraga
Copy link
Member

pdyraga commented May 18, 2022

To replicate the problem, please check out b698022 and run yarn test.

The fix was applied in 9738385 but the root cause is still unknown.

Let's say there is a unit test calling await waffle.loadFixture(bridgeFixture) in the setup. For example, Bridge.Wallets.test.ts.

Then, VendingMachine.test.ts loads await waffle.loadFixture(vendingMachineFixture) and modifies the state of VendingMachine by transferVendingMachineUpgradeInitiatorRole to some address.

Finally, some other test starts and that test calls await waffle.loadFixture(bridgeFixture). For example, TBTCVault.Redemption.test.ts. THIS TEST WILL OBSERVE CHANGES DONE BY VendingMachine.test.ts. For example, the upgrade initiator will be the address set by VendingMachine.test.ts.

This is not happening if we use await waffle.loadFixture(bridgeFixture) in all three tests. The root cause is unkown, we suspect it is some clash between plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant