A validation check is in place which expects there to be a coverageReporters array including 'lcov' in the jest config export. However, this doesn't take into account setups which set reporters in a shared file extending with preset: '../../jest.preset.js' (common practice in Nx), to reduce duplication. Since the preset file values aren't directly exported by a given project's config in this case, validation fails with Jest coverage configuration at ... does not include LCOV report format for target .... Add 'lcov' format under coverageReporters..
1298c1311
< if (!testConfig.coverageReporters?.includes("lcov")) {
---
> if (!testConfig.coverageReporters?.includes("lcov") && !("preset" in testConfig)) {
A validation check is in place which expects there to be a
coverageReportersarray including'lcov'in the jest config export. However, this doesn't take into account setups which set reporters in a shared file extending withpreset: '../../jest.preset.js'(common practice in Nx), to reduce duplication. Since the preset file values aren't directly exported by a given project's config in this case, validation fails withJest coverage configuration at ... does not include LCOV report format for target .... Add 'lcov' format under coverageReporters..