Skip to content
This repository has been archived by the owner on Jun 14, 2018. It is now read-only.

Truffle hangs and then throws exception when running truffle test #48

Open
RFV opened this issue Mar 25, 2017 · 1 comment
Open

Truffle hangs and then throws exception when running truffle test #48

RFV opened this issue Mar 25, 2017 · 1 comment

Comments

@RFV
Copy link

RFV commented Mar 25, 2017

truffle test

Compiling ./contracts/ExampleToken.sol...
Compiling ./contracts/HMLottery.sol...
Compiling ./test/TestHMLottery.sol...
Compiling truffle/Assert.sol...
Compiling truffle/DeployedAddresses.sol...
Compiling zeppelin/SafeMath.sol...
Compiling zeppelin/lifecycle/Killable.sol...
Compiling zeppelin/ownership/Contactable.sol...
Compiling zeppelin/ownership/Ownable.sol...
Compiling zeppelin/token/ERC20.sol...
Compiling zeppelin/token/StandardToken.sol...
/usr/lib/node_modules/truffle/node_modules/truffle-solidity-utils/index.js:31
      contract_definition.body.forEach(function(statement) {
                              ^

TypeError: Cannot read property 'forEach' of null
    at /usr/lib/node_modules/truffle/node_modules/truffle-solidity-utils/index.js:31:31
    at tryToString (fs.js:456:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:443:12)

@CillyIAAgent
Copy link

So we had the same problem and the reason it happened was that we had a test class with no functions or anything else in it. Once we made a empty function in it the error was gone

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants