{"record":{"id":"b18126f04296b786","repo":"angular/angular-cli","slug":"project-projectname-uses-a-custom-coverage-re","errorCode":null,"errorMessage":"Project \"${projectName}\" uses a custom coverage reporter \"${type}\". This reporter cannot be automatically mapped to Vitest. Please check the Vitest documentation for equivalent coverage reporters.","messagePattern":"Project \"(.+?)\" uses a custom coverage reporter \"(.+?)\"\\. This reporter cannot be automatically mapped to Vitest\\. Please check the Vitest documentation for equivalent coverage reporters\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/schematics/angular/migrations/migrate-karma-to-vitest/karma-processor.ts","lineNumber":86,"sourceCode":"  // Extract coverage reporters\n  const covReporters = (coverageReporter as Record<string, unknown>)['reporters'];\n  if (Array.isArray(covReporters)) {\n    const mappedCovReporters: string[] = [];\n    for (const r of covReporters) {\n      let type: string | undefined;\n      if (typeof r === 'object' && r !== null && 'type' in r) {\n        if (typeof r['type'] === 'string') {\n          type = r['type'];\n        }\n      } else if (typeof r === 'string') {\n        type = r;\n      }\n\n      if (type) {\n        if (SUPPORTED_COVERAGE_REPORTERS.has(type)) {\n          mappedCovReporters.push(type);\n        } else {\n          context.logger.warn(\n            `Project \"${projectName}\" uses a custom coverage reporter \"${type}\". ` +\n              `This reporter cannot be automatically mapped to Vitest. ` +\n              `Please check the Vitest documentation for equivalent coverage reporters.`,\n          );\n        }\n      }\n    }\n    if (mappedCovReporters.length > 0) {\n      options['coverageReporters'] = [...new Set(mappedCovReporters)];\n    }\n  }\n\n  // Extract coverage thresholds\n  const check = (coverageReporter as Record<string, unknown>)['check'];\n  if (typeof check === 'object' && check !== null) {\n    const global = (check as Record<string, unknown>)['global'];\n    if (typeof global === 'object' && global !== null) {\n      const thresholds: Record<string, number> = {};","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/schematics/angular/migrations/migrate-karma-to-vitest/karma-processor.ts#L68-L104","documentation":"During the Karma-to-Vitest migration, extractCoverageSettings maps Karma coverage reporters to Vitest-supported ones. When a karma.conf.js declares a coverage reporter type not in SUPPORTED_COVERAGE_REPORTERS, this warning tells you the reporter cannot be auto-mapped and you must pick an equivalent Vitest/istanbul reporter yourself.","triggerScenarios":"Running the migrate-karma-to-vitest migration (via processKarmaConfig -> extractCoverageSettings) on a project whose karma.conf.js coverageReporter.type is a custom value not in the supported set (e.g. 'json-summary' variants, 'lcovonly', 'teamcity', or custom reporter names).","commonSituations":"Projects with customized karma-coverage setups (html+lcovonly combos, CI-specific reporters like teamcity or cobertura, third-party reporters) migrating from Karma/ Jasmine to Vitest on Angular CLI upgrades.","solutions":["Open the project's karma.conf.js and note the custom coverageReporter.type","Set an equivalent supported reporter in the generated Vitest coverage config (e.g. via vitest-base.config.ts or the test builder's coverageReporters option: ['html','lcov','text'])","Replace CI-specific reporters with nyc/istanbul equivalents supported by Vitest (e.g. cobertura -> 'clover'/'lcov' plus a conversion step, teamcity -> 'text' parsed by CI)","Re-run or complete the migration and verify coverage output matches your CI expectations"],"exampleFix":"// before (karma.conf.js)\ncoverageReporter: { type: 'teamcity' }\n// after (vitest config / builder options)\ntest: { coverage: { reporter: ['text', 'lcov'] } }","handlingStrategy":"validation","validationCode":"// before migrating, check your karma reporters\nconst types = (karmaConfig.coverageReporter?.type || []);\nconst supported = new Set(['clover','cobertura','lcov','lcovonly','html','json','json-summary','text','text-summary','teamcity','none']);\nconst unsupported = [].concat(types).filter(t => !supported.has(t));\nif (unsupported.length) console.warn('Manual coverage reporter mapping needed:', unsupported);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep karma coverage reporters within the commonly supported nyc/istanbul set","Avoid CI-vendor-specific reporters (teamcity, cobertura) in karma.conf.js; generate lcov and convert in CI instead","Review karma.conf.js customizations before running the Karma->Vitest migration"],"tags":["angular","schematics","vitest","karma-migration","coverage"],"backgroundTag":"unsupported-coverage-reporter","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}