You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@wighawag Is it impossible to launch vitest from a task? e.g it's not a problem specifically with overriding "test"?
solidity-coverage attaches to the in-memory provider to watch the test execution trace. It won't work with an independent node. I don't know enough about vitest to understand what should be done but if you have an example I could look at am happy to check it out.
In principle it should be possible to use the internal API solidity-coverage's own task uses to get something working around any test framework as long as it provides hooks for starting and finishing the test suite. (The API docs are a little inaccurate - they predate the existence of the hardhat client)
If you can launch vitest from a hardhat task, I'd suggest stealing all the code in the coverage task and adapting it to launch vitest somehow...
I am currently using vitest for my test
it use hardhat environment by simply importing hardhat,
Now if I install soldiity-coverage as plugin, it seems I need to make use of hardhat test task which does not let me use my vitest tests.
Is there a way to let the coverage be executed against my external test ?
Ideally I would like that to happen in memory but if that require launching a hardhat node, that would be fine enough
Note: I tried to execute vitest inside hardhat via overriding the TEST task but could not get it working, probably due to cjs / esm
The text was updated successfully, but these errors were encountered: