You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{ethers}from"hardhat";import{smock}from"@defi-wonderland/smock";describe.only("Example",function(){it('should test if getAddress can be mocked',async()=>{const[owner,addr1]=awaitethers.getSigners();constexampleFactory=awaitsmock.mock('Example');console.log(exampleFactory);constexample=awaitexampleFactory.deploy(owner.address);awaitexample.getAddress.returns(addr1.address);constaddress=awaitexample.getAddress();console.log(address);console.log(addr1.address);console.log(owner.address);});});
when removing the console.log line in solidity, test work as expected
The text was updated successfully, but these errors were encountered:
test: should log the mocked address
when removing the
console.log
line in solidity, test work as expectedThe text was updated successfully, but these errors were encountered: