UNPKG

apex-code-coverage-transformer

Version:

Transform Salesforce Apex code coverage JSONs into other formats accepted by SonarQube, GitHub, GitLab, Azure, Bitbucket, etc.

23 lines 871 B
'use strict'; import { CloverCoverageHandler } from './clover.js'; import { CoberturaCoverageHandler } from './cobertura.js'; import { SonarCoverageHandler } from './sonar.js'; import { LcovCoverageHandler } from './lcov.js'; import { JaCoCoCoverageHandler } from './jacoco.js'; import { IstanbulCoverageHandler } from './istanbulJson.js'; export function getCoverageHandler(format) { const handlers = { sonar: new SonarCoverageHandler(), cobertura: new CoberturaCoverageHandler(), clover: new CloverCoverageHandler(), lcovonly: new LcovCoverageHandler(), jacoco: new JaCoCoCoverageHandler(), json: new IstanbulCoverageHandler(), }; const handler = handlers[format]; if (!handler) { throw new Error(`Unsupported format: ${format}`); } return handler; } //# sourceMappingURL=getHandler.js.map