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

Smart contracts tests speed up #315

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

daveroga
Copy link
Contributor

@daveroga daveroga commented Nov 11, 2024

Speed up smart contracts tests:

  • Use of hardhat fixtures for avoiding deployment of contracts in each test in the same test script
import { loadFixture } from "@nomicfoundation/hardhat-toolbox/network-helpers";
  • Use time helper for increasing blockchain time in validators tests instead of waiting explicitly in script
import { time } from "@nomicfoundation/hardhat-network-helpers";

@coveralls
Copy link

coveralls commented Nov 11, 2024

Pull Request Test Coverage Report for Build 11780618208

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 83.523%

Totals Coverage Status
Change from base Build 11747628628: 0.0%
Covered Lines: 990
Relevant Lines: 1115

💛 - Coveralls

@daveroga daveroga marked this pull request as ready for review November 11, 2024 13:51
]);
} else {
await publishState(state, test.stateTransitions[i]);
await time.increase(test.stateTransitionDelayMs);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

@AndriianChestnykh AndriianChestnykh merged commit fd2cd71 into master Nov 11, 2024
5 checks passed
@AndriianChestnykh AndriianChestnykh deleted the PID-2574-smart-contracts-test-speed-up branch November 11, 2024 16:25
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.

4 participants