LimeChain / etherlime

Dapp Development framework based on ethers.js
MIT License
185 stars 41 forks source link

Error when running test coverage: TypeError: this.timeout is not a function #316

Open elenadimitrova opened 4 years ago

elenadimitrova commented 4 years ago

Some random errors after contract instrumentation have started happening since yesterday:

Instrumenting for coverage...
=============================

...
> server:            http://127.0.0.1:8545
Error: TypeError: this.timeout is not a function
    at Object.runCoverage (/Users/Elena/Source/argent-contracts/node_modules/etherlime/cli-commands/etherlime-test/etherlime-coverage.js:84:9)
etherlime coverage [path] [timeout] [port] [solcVersion] [workingDirectory]
[html] [ignoreFiles]

Run all tests with code coverage.

Sample failing build: https://circleci.com/gh/argentlabs/argent-contracts/289

Also

> server:            http://127.0.0.1:8545
Error: SyntaxError: Invalid or unexpected token
    at Object.runCoverage (/home/circleci/argent-contracts/node_modules/etherlime/cli-commands/etherlime-test/etherlime-coverage.js:84:9)
etherlime coverage [path] [timeout] [port] [solcVersion] [workingDirectory]
[html] [ignoreFiles]

Sample failing build: https://circleci.com/gh/argentlabs/argent-contracts/287

ochikov commented 4 years ago

Thank you. I will investigate it.

elenadimitrova commented 4 years ago

I managed to narrow it down to changing the empty function declarations to use arrow syntax:

describe("Test Approved Transfer", function () { => describe("Test Approved Transfer", () => {

This change is okay when running the mocha tests but not under coverage.