mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 09:47:56 +08:00
All interaction tests are now lazily instrumented with Istanbul to obtain code coverage. The interactions tests can be started with `COVERAGE=1` to obtain coverage. For that, the Mocha hooks perform the eventual reporting and gathering of data. The instrumentation is performed in the components server itself. To make sure that we perform the minimal amount of work required (since code coverage instrumentation is computationally expensive), we preload pages to populate the instrumentation cache. Every interactions tests should preload an example (most likely basic.html) to populate the cache. Every subsequent test will then use the already-instrumented code, rather than computing the code over and over again. The eventual code coverage is written to /interactions-coverage. The results will eventually be merged with /karma-coverage to obtain the union of both unit and interaction tests coverage. R=aerotwist@chromium.org,jacktfranklin@chromium.org Bug: 1206705 Change-Id: I5e19b1ecef23d21107210699cb29800556e0415e Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2879986 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>