PatrickAlphaC / hardhat-fund-me-fcc

82 stars 183 forks source link

In withdraw unit test assertion actual and expected values should be swapped #90

Open kadza opened 1 year ago

kadza commented 1 year ago

IMHO (starting fundMe balance + starting deployer balance) is the expected value. Assert equal method signature is (actual, expected, message) : void. It means that the actual and expected values should be swapped

assert.equal(
  startingFundMeBalance.add(startingDeployerBalance).toString(), 
  endingDeployerBalance.add(gasCost).toString()
)