ekke
ekke copied to clipboard
Generate coverage information
As our tests are executing inside of React-Native common used coverage tools such as nyc
cannot be used to instrument our code. A custom solution needs to be created. We should be able to leverage existing tools todo the heavy lifting for us.
All the code that is executed by Metro bundler is already getting processed by babel. This would allow us to inject instrumentation into the code using thehttps://github.com/istanbuljs/babel-plugin-istanbul package. The instrumentation data can then be transferred using our established WebSocket connection and coverage information can then be assembled once the test complete.
The only thing we need to consider is if we want this work to be available as part of the core or as a seperate plugin and keep ekke
's internals as clean as possible.
Acceptance Criteria
- [ ] Introduces the babel plugin to instrument the users' code.
- [ ] Sends the coverage information over the WebSocket connection to the CLI.
- [ ] Assembles and reports coverage information once tests complete.
- [ ] Is documented and has unit tests. (Consider documenting how users can merge 2 coverage reports if they use both node.js based tests and
ekke
)