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

Mock Etherscan calls inside the etherscan.js tests #1358

Closed
Tracked by #1354
manuelwedler opened this issue Apr 18, 2024 · 0 comments · Fixed by #1406
Closed
Tracked by #1354

Mock Etherscan calls inside the etherscan.js tests #1358

manuelwedler opened this issue Apr 18, 2024 · 0 comments · Fixed by #1406
Assignees

Comments

@manuelwedler
Copy link
Collaborator

Most of the tests in etherscan.js (not etherscanInstances.js) are intended to test our own handlers for the /verify/etherscan endpoint. This means we can mock the external HTTP call to the Etherscan API in many cases. This should make them faster and less dependent on their API being functional.

As far as I can see, we don't have a mocking library in the tests, yet. It might be worth adding one, like sinon.js for example or Nock for http mocking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Sprint - Done
Development

Successfully merging a pull request may close this issue.

2 participants