How to mock a ethereum web3HttpProvider for unit testing of REST API? #5065
Unanswered
vineetaparodkar
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
REST API has following basic structure(index.js)where provider, wallets are created using web3HttpProvider and etherjs when server is started.
Index.js
Solution tried: index.test.js
Which results in web3HttpProvider is not a constructor. How to properly mock web3HttpProvider and etherjs to write unit test for REST APIs?
Beta Was this translation helpful? Give feedback.
All reactions