When creating a new SFDX project, the default Jest configuration for LWC unit tests looks like this:
jest.config.js
const { jestConfig } = require('@salesforce/sfdx-lwc-jest/config');
module.exports = {
...jestConfig,
modulePathIgnorePatterns: ['<rootDir>/.localdevserver']
};
By running...
sfdx-lwc-jest --coverage
...it shows me the current test coverage in the console and generates a lcov coverage report in the /coverage
directory of my project. However, I need coverage and test results generated with Cobertura and JUnit to be able to properly use them for reporting and publishing in an automated pipeline run. I wonder if it is possible to overwrite or extend this default predefined LWC Jest configuration in this regard?