JoranHonig / vertigo

Mutation Testing for Ethereum Smart Contracts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mutation tests fail for TypeScript Hardhat projects

jerobar opened this issue · comments

When e.g. vertigo run --hardhat-parallel 8 is run in a newly-created Typescript Hardhat project, it errors with:

[*] Could not find supported project directory in <project dir>

I believe this is because the _directory_type function on line 203 of eth_vertigo/cli/main.py fails to check for hardhat.config.ts. However, when that file is renamed to hardhat.config.js the test still fails with a the following error:

[*] Starting mutation testing
[*] Starting analysis on project
[*] Initializing campaign run 
[*] Checking validity of project
[-] Encountered an error while running the framework's test command:
Encountered error during test output analysis

Note that I also tried updating eth_vertigo/cli/main.py and eth_vertigo/cli/hardhat/tester.py locally to add references to hardhat.config.ts and reinstalled vertigo but it still produces the error above.

I can also add that printing the test_result variable on line 133 of eth_vertigo/interfaces/common/tester.py prints nothing to the console. It looks like the preamble flag on line 123 never gets set to False when run in a TypeScript project, but does when run in a JavaScript project.

Hello @jerobar
were you able to fix this?