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

Update hardhat tests to use loadFixture #172

Merged
merged 5 commits into from
May 15, 2023
Merged

Update hardhat tests to use loadFixture #172

merged 5 commits into from
May 15, 2023

Conversation

grp06
Copy link
Contributor

@grp06 grp06 commented May 2, 2023

Describe your changes

  • added loadFixture which loads just once compared to beforeEach
  • we had this a long time ago but took it out because we wanted to try running tests on a live network at some point, which wasn't necessary
  • tests now run in 8s instead of 18s

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • I have updated the documentation accordingly. (if applicable)
  • All new and existing tests passed.

@grp06 grp06 requested a review from rahulrumalla May 2, 2023 19:45
@linear
Copy link

linear bot commented May 2, 2023

DEV-786 re-implement loadFixture in hardhat tests

  1. const { loadFixture } = require("nomicfoundation/hardhat-network-helpers");
  2. we only got rid of loadFixture as an experiment when we first pushed our contracts to Goerli in order to run our tests on a live network... Re-implementing it will speed up our hardhat tests considerably

@grp06 grp06 merged commit b4f1e98 into dev May 15, 2023
@grp06 grp06 deleted the DEV-786 branch May 15, 2023 20:06
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

Successfully merging this pull request may close these issues.

2 participants