godaddy / ekke

Ekke is a test runner for React-Native, it allows you to execute your test code directly on the device enabling you to test in the same environment as your production users.
MIT License
133 stars 9 forks source link

Generate coverage information #14

Open 3rd-Eden opened 5 years ago

3rd-Eden commented 5 years ago

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