embark/packages/plugins/coverage/src
Pascal Precht 765e889121 fix(@embark/coverage): ensure handlers for 'tests:finished' are run as actions
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.
2019-12-20 16:11:48 -05:00
..
lib fix(@embark/coverage): ensure handlers for 'tests:finished' are run as actions 2019-12-20 16:11:48 -05:00
test move rest of the packages to their logical folders (#1886) 2019-09-07 15:45:25 -04:00