Truffle tests not running after truffle init

0 votes

I am trying to build a dapp using truffle on my Mac OSX. I have installed Testrpc and Truffle globally with NPM. I ran testrpc in a terminal window and ran truffle test. I get 2 passing and 3 failing tests. The three failing tests are

TestMetacoin testInitialBalanceUsingDeployedContract:

TestMetacoin testInitialBalanceWithNewMetaCoin:

and

Contract: MetaCoin should send coin correctly:

each is failing at the same place:

Uncaught TypeError: Cannot read property '1' of undefined
  at /usr/local/lib/node_modules/truffle/node_modules/ethjs-abi/lib/index.js:139:34
  at Array.map (native)
  at Object.decodeEvent (/usr/local/lib/node_modules/truffle/node_modules/ethjs-abi/lib/index.js:138:6)
  at /usr/local/lib/node_modules/truffle/node_modules/truffle-contract/contract.js:73:38
  at Array.map (native)
  at Object.decodeLogs (/usr/local/lib/node_modules/truffle/node_modules/truffle-contract/contract.js:44:19)
  at Object.callback (/usr/local/lib/node_modules/truffle/node_modules/truffle-contract/contract.js:172:35)
  at /usr/local/lib/node_modules/truffle/node_modules/truffle-contract/node_modules/web3/lib/web3/method.js:142:25
  at /usr/local/lib/node_modules/truffle/node_modules/truffle-contract/node_modules/web3/lib/web3/requestmanager.js:89:9
  at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/node_modules/web3/lib/web3/httpprovider.js:119:13)
  at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/node_modules/xhr2/lib/xhr2.js:64:18)
  at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/node_modules/xhr2/lib/xhr2.js:354:12)
  at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/node_modules/xhr2/lib/xhr2.js:509:12)
  at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/node_modules/xhr2/lib/xhr2.js:469:24)

I am sure I am missing something simple, any help is appreciated.

Sep 11, 2018 in Blockchain by sabby
• 4,390 points
1,655 views

1 answer to this question.

0 votes
This was a bug. They've fixed it. So, just re-install truffle :p
answered Sep 11, 2018 by Christine
• 15,790 points

Related Questions In Blockchain

0 votes
1 answer

Not able to migrate truffle project even after running testrpc

Maybe you forgot to compile the project ...READ MORE

answered Dec 11, 2018 in Blockchain by Omkar
• 69,210 points
605 views
0 votes
1 answer
+1 vote
5 answers

How to solve "truffle: command not found" error in blockchain?

First try restarting the system and then ...READ MORE

answered Jul 16, 2018 in Blockchain by slayer
• 29,350 points
11,245 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,211 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,450 points
1,123 views
0 votes
1 answer

Why am I not getting 100 ethers in my metamask account?

Sorry that you're having this problem. To ...READ MORE

answered Jun 14, 2018 in Blockchain by Christine
• 15,790 points
2,248 views
0 votes
1 answer

Why do the resultant hash after mining has a leading no. of zeroes in Blockchain verification?

This is chosen by the DIFFICULTY EQUATION. In ...READ MORE

answered Aug 10, 2018 in Blockchain by Christine
• 15,790 points
3,248 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP