{"record":{"id":"65893b9d3b266c25","repo":"angular/angular-cli","slug":"project-projectname-uses-the-kjhtml-reporte","errorCode":null,"errorMessage":"Project \"${projectName}\" uses the \"kjhtml\" reporter. This has not been automatically mapped. For an interactive test UI in Vitest, consider setting the \"ui\" option to true in your test target options and installing \"@vitest/ui\".","messagePattern":"Project \"(.+?)\" uses the \"kjhtml\" reporter\\. This has not been automatically mapped\\. For an interactive test UI in Vitest, consider setting the \"ui\" option to true in your test target options and installing \"@vitest/ui\"\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/schematics/angular/migrations/migrate-karma-to-vitest/karma-processor.ts","lineNumber":29,"sourceCode":"import { SUPPORTED_COVERAGE_REPORTERS, SUPPORTED_REPORTERS } from './constants';\nimport { KarmaConfigAnalysis, analyzeKarmaConfig } from './karma-config-analyzer';\nimport { compareKarmaConfigToDefault, hasDifferences } from './karma-config-comparer';\n\nfunction extractReporters(\n  analysis: KarmaConfigAnalysis,\n  options: Record<string, json.JsonValue | undefined>,\n  projectName: string,\n  context: SchematicContext,\n): void {\n  const reporters = analysis.settings.get('reporters');\n  if (Array.isArray(reporters)) {\n    const mappedReporters: string[] = [];\n    for (const r of reporters) {\n      if (typeof r === 'string') {\n        if (r === 'progress') {\n          mappedReporters.push('default');\n        } else if (r === 'kjhtml') {\n          context.logger.warn(\n            `Project \"${projectName}\" uses the \"kjhtml\" reporter. ` +\n              `This has not been automatically mapped. ` +\n              `For an interactive test UI in Vitest, consider setting the \"ui\" option to true in your test target options ` +\n              `and installing \"@vitest/ui\".`,\n          );\n        } else if (SUPPORTED_REPORTERS.has(r)) {\n          mappedReporters.push(r);\n        } else {\n          context.logger.warn(\n            `Project \"${projectName}\" uses a custom Karma reporter \"${r}\". ` +\n              `This reporter cannot be automatically mapped to Vitest. ` +\n              `Please check the Vitest documentation for equivalent reporters.`,\n          );\n        }\n      } else {\n        context.logger.warn(\n          `Project \"${projectName}\" has a non-string reporter in Karma config. ` +\n            `This cannot be automatically mapped to Vitest.`,","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/schematics/angular/migrations/migrate-karma-to-vitest/karma-processor.ts#L11-L47","documentation":"Warning from extractReporters in the Karma-to-Vitest migration (karma-processor.ts). The migration maps known Karma reporters to Vitest equivalents (e.g. 'progress' -> 'default'), but the 'kjhtml' interactive HTML reporter has no automatic Vitest mapping. The schematic warns that it was skipped and suggests the Vitest UI plugin as the equivalent experience.","triggerScenarios":"Running the migrate-karma-to-vitest migration on a project whose karma.conf.js `reporters` array includes 'kjhtml'; the string is recognized, unmapped, warned, and omitted from mappedReporters.","commonSituations":"Projects that used karma-jasmine-html-reporter for interactive HTML test results; teams migrating legacy Karma setups that had the reporter added via `ng generate config` in older CLI versions.","solutions":["Remove 'kjhtml' from reporters and rely on the mapped defaults; run tests with `ng test` after migration.","Install `@vitest/ui` and set `\"ui\": true` in the test target options for an interactive UI.","Manually add a Vitest html reporter in the generated config if HTML output is required.","Update dependencies to drop karma-jasmine-html-reporter from package.json since it is no longer used."],"exampleFix":"// before (karma.conf.js)\nreporters: ['progress', 'kjhtml'],\n// after (generated vitest config)\ntest: { reporters: ['default'], ui: true }, // plus npm i -D @vitest/ui","handlingStrategy":"validation","validationCode":"const reporters: string[] = karmaConfig?.reporters ?? [];\nif (reporters.includes('kjhtml')) {\n  console.warn('kjhtml will not be migrated; plan to use @vitest/ui instead');\n}","typeGuard":"function usesKjhtml(reporters: unknown): reporters is string[] {\n  return Array.isArray(reporters) && reporters.some(r => r === 'kjhtml');\n}","tryCatchPattern":null,"preventionTips":["Remove kjhtml/karma-jasmine-html-reporter before migrating to Vitest.","Adopt @vitest/ui with `ui: true` as the interactive replacement.","Review karma.conf.js reporters before running migrations so you know what will be skipped."],"tags":["angular","migration","karma","vitest","reporters","kjhtml"],"backgroundTag":"unmigrated-karma-reporter","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}