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

Unable to mock the functions using Smock.mock #179

Open
adi274 opened this issue Jan 3, 2023 · 1 comment
Open

Unable to mock the functions using Smock.mock #179

adi274 opened this issue Jan 3, 2023 · 1 comment

Comments

@adi274
Copy link

adi274 commented Jan 3, 2023

Describe the bug

I tried mocking a function but it's not working. Here is the gist containing the tests that I trying to run.

I tried mocking several functions

Expected behavior
The above mentioned functions should be mocked as per the requirements, but the actual implementations of the contract is running.

System Specs:

  • OS: MacOS Monterey
  • Hardhat version: 2.12.2
  • smock - ^2.3.4
@cleivson
Copy link

I'm having problem. When calling the mocked function for the first time it runs the actual contract code. On the second time forward it calls the fake function

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

2 participants