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

fix test in smart-contract-example #360

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tuky191
Copy link

@tuky191 tuky191 commented May 16, 2024

Hey,

was trying to follow the deploy-and-test-your-dapp-locally

but when running the npx hardhat test --network localnet i just got following error.

  ChipToken
    mint
      1) "before each" hook for "should mint 1000 chips for PLAYER ONE"


  0 passing (66ms)
  1 failing

  1) ChipToken
       "before each" hook for "should mint 1000 chips for PLAYER ONE":
     TypeError: this.chips.deployed is not a function
      at Context.<anonymous> (test/ChipToken.js:11:22)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

deployed() is no longer in use and is replaced with waitForDeployment()

after changing, the test is passing

  ChipToken
    mint
      ✔ should mint 1000 chips for PLAYER ONE (13047ms)


  1 passing (21s)

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.

1 participant