kurtosis-tech / awesome-kurtosis

Official Awesome Kurtosis page. Code examples using Kurtosis
MIT License
31 stars 10 forks source link

`npx hardhat test --network localnet` command fails #190

Closed abhijeetbhagat closed 8 months ago

abhijeetbhagat commented 9 months ago

i followed all the steps from https://docs.kurtosis.com/how-to-local-eth-testnet#deploy-and-test-your-dapp-locally i get the following output:

⟩ npx hardhat test --network localnet

  ChipToken
    mint
      1) should mint 1000 chips for PLAYER ONE

  0 passing (36s)
  1 failing

  1) ChipToken
       mint
         should mint 1000 chips for PLAYER ONE:

      AssertionError: expected 0 to equal 1000. The numerical values of the given "ethers.BigNumber" and "number" inputs were compared, and they differed.
      + expected - actual

      -0
      +1000

      at Context.<anonymous> (test/ChipToken.js:18:63)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
⟩ npx hardhat --version
2.17.3
tedim52 commented 9 months ago

Hey @abhijeetbhagat , thanks for reading through our blog post and submitting this issue! I'll take a look at this for ya and get back to you.

niinorz commented 8 months ago

I get same fails.

tedim52 commented 8 months ago

Hey @abhijeetbhagat and @niinorz - just pushed a fix for this issue: https://github.com/kurtosis-tech/awesome-kurtosis/pull/196.

For context - the balance was being checked before the transaction had finalized. I fixed it to wait for the transaction to finalize before checking so that the test passes!.

Thank you both again for making this issue!