首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >一些未经松露测试(Mac )未运行的TypeError

一些未经松露测试(Mac )未运行的TypeError
EN

Ethereum用户
提问于 2017-03-19 23:06:10
回答 1查看 359关注 0票数 0

我正在尝试使用特松露构建一个DApp。我已经在NPM的全球范围内安装了Testrpc和Truffle。我在终端窗口运行了testrpc,并进行了松露测试。我有2次通过考试,3次不及格。三项不合格的测试是:

代码语言:javascript
复制
TestMetacoin testInitialBalanceUsingDeployedContract:

TestMetacoin testInitialBalanceWithNewMetaCoin:

代码语言:javascript
复制
Contract: MetaCoin should send coin correctly:

每一次失败都有相同的信息:

代码语言:javascript
复制
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)

我相信我错过了一些简单的东西,任何帮助都是值得感激的。

编辑:看来,由于某种原因,在decodeEvent方法中,失败测试中的主题将为零。这是我第一次体验松露或脱脂,所以我不知道如何补救这一点,但我会继续挖掘。

EN

回答 1

Ethereum用户

回答已采纳

发布于 2017-03-22 00:30:29

原来是松露中的一个虫子。我不得不卸载和重新安装松露,我的测试现在都是绿色的。https://github.com/trufflesuite/truffle/issues/377

票数 0
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/13294

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档