W
W
Worddoc2019-05-18 23:54:30
JavaScript
Worddoc, 2019-05-18 23:54:30

How to test send() method in web3.js?

Greetings!
Such a question: now there is web3.js that works with the Metamask plugin as a provider. When calling a contract method via send(), Metamask requests confirmation of the operation (Reject/Confirm) through its interface. It turns out that it is impossible to write a unit test for such a method. Tell me, are there any options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DENIS SHELESTOV, 2019-05-31
@djdeniro

use provider instead of metamask - https://ropsten.infura.io. In this case, the tests will be carried out in the ropsten ethereum network

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question