projen / projen

Rapidly build modern applications with advanced configuration management
https://projen.io
Apache License 2.0
2.53k stars 362 forks source link

fix(jest)!: setting coverageProvider has no effect #3611

Closed mrgrain closed 4 weeks ago

mrgrain commented 4 weeks ago

The Jest component previously defaulted to the v8 coverage provider via a CLI argument. This approach prevented the value from being changed. The conditions for this default were scoped to NodeProjects. Anyone using the component with a project type not based on NodeProject or manually resetting the CLI options, would not have been effected by this.

Coverage provide has now been updated to always default v8 via a config option. With this it is now possible again to change the coverage provider. This change can effect projects if they were previously relying on using babel as coverage provider.

BREAKING CHANGE: The jest coverage provider now always to v8 via config. Most projects won't be effected by this change since this default was already set in most circumstances. To use babel instead, set the coverageProvider option on jestConfig.

We are making this change to fix coverage provider not being configurable. We are changing the default to be more consistent across all projects and remove the conditionality of it.

Fixes: #3550 Re-rolls: #3601


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Fixes #


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.