If I only use named exports or default exports in a single import statement, the coverage is consistent. However, it should be valid to use both named and default exports. From the Mozilla docs:
Every module can have two different types of export, named export and default export. You can have multiple named exports per module but only one default export.
Link to bug demonstration repository
https://github.com/samblackmore/nyc-coverage-repro
Expected Behavior
The coverage report should be the same every time.
Observed Behavior
The coverage report alternates between Run A and Run B.
Run A:
Run B:
Troubleshooting steps
cache: false
in my nyc configObservations
The following line is the culprit:
If I only use named exports or default exports in a single
import
statement, the coverage is consistent. However, it should be valid to use both named and default exports. From the Mozilla docs:Environment Information