mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-20 18:50:16 +00:00
765e889121
There was a race condition in which the coverage module tried to read a generated coverage report before it was actually generated. The issue was that the coverage generation was done on Embark's `tests:finished` event in a fire and forget manner via `emit('tests:finished')` which doesn't ensure control flow. This commit changes it to use `runActionsForEvent('tests:finished')` instead and also registers the handler for coverage report generation as action via `registerActionForEvent()`. This ensures that those actions are run first, before the code moves on with other operations that might rely on the result of any of those actions.
embark-coverage
Code coverage capabilities for Embark
Visit embark.status.im to get started with Embark.
Contracts in test/fixture/contracts
are from OpenZeppelin and Gnosis Prediction Markets