Files
callstack__agent-device/test/integration/macos-e2e/coverage-report.ts
Michał Pierzchała d57aa69777 test: add macOS platform command coverage manifest (#1922)
* test: add macOS platform command coverage manifest

* fix: remove unused macOS coverage type exports

* test: route macOS coverage away from iOS lane

* fix: account for host-dependent macOS audio capability

* fix: run macOS coverage manifest in CI
2026-08-21 12:39:35 +02:00

27 lines
753 B
TypeScript

import fs from 'node:fs';
import path from 'node:path';
import {
MACOS_LIVE_SCENARIOS,
MACOS_PLATFORM_COVERAGE_CLASSIFICATION_SUMMARY,
liveCommandsForScenario,
} from './coverage-manifest.ts';
export function writeCoverageReport(artifactDir: string): string {
fs.mkdirSync(artifactDir, { recursive: true });
const reportPath = path.join(artifactDir, 'coverage-report.json');
fs.writeFileSync(
reportPath,
JSON.stringify(
{
classificationSummary: MACOS_PLATFORM_COVERAGE_CLASSIFICATION_SUMMARY,
liveCommands: MACOS_LIVE_SCENARIOS.flatMap(({ id }) => liveCommandsForScenario(id)),
liveScenarios: MACOS_LIVE_SCENARIOS.map(({ id }) => id),
},
null,
2,
),
);
return reportPath;
}