mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
d57aa69777
* 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
27 lines
753 B
TypeScript
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;
|
|
}
|