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

Testing frameworks not working on live networks #4572

Closed
lyh970817 opened this issue Nov 9, 2023 · 1 comment
Closed

Testing frameworks not working on live networks #4572

lyh970817 opened this issue Nov 9, 2023 · 1 comment
Assignees

Comments

@lyh970817
Copy link

Version of Hardhat

2.13.0

What happened?

I can use the expect statement in the following manner when testing with hardhat local network:

expect(await goodbye.airnode(), "Airnode address").to.not.equal(ethers.constants.AddressZero);

This, however, does not work when the contract is deployed on a live network (npx hardhat test --network mumbai. It appears to forever hangs when the statement previous to the expect statement finishes running.

Minimal reproduction steps

Add config for a live network in hardhat.config.js, deploy a smart contract on the live network with any public variable and use an expect statement similar to the following in a file in the test folder:

expect(await CONTRACT.PUBLIC_VARIABLE(), "Public variable").to.not.equal(ethers.constants.AddressZero);

Search terms

test, chai, expect

@fvictorio
Copy link
Member

Hi @lyh970817, the only reason that statement could hang is if the goodbye.airnode() is hanging. That might be related to the node provider you are connecting to or something else, but it's unlikely to be related to Hardhat. Notice that you are using a plain .to.equal comparison, so this doesn't even involve our plugins.

Happy to re-open if you can provide specific steps that show that something is not working on our side.

@fvictorio fvictorio closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in Hardhat Nov 10, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

3 participants