-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathcore.ts
More file actions
37 lines (34 loc) · 1.48 KB
/
Copy pathcore.ts
File metadata and controls
37 lines (34 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { join } from "node:path";
import { existsSync } from "node:fs";
const basePath = getBasePath("reports");
export const BuiltInReports = {
SummaryTable: join(basePath, "summary-table.hbs"),
SummaryDeltaTable: join(basePath, "summary-delta-table.hbs"),
TestsChangedTable: join(basePath, "tests-changed-table.hbs"),
TestTable: join(basePath, "test-table.hbs"),
TestList: join(basePath, "test-list.hbs"),
FailedTable: join(basePath, "failed-table.hbs"),
FailedFolded: join(basePath, "failed-folded.hbs"),
FailRateTable: join(basePath, "fail-rate-table.hbs"),
SkippedTable: join(basePath, "skipped-table.hbs"),
FlakyTable: join(basePath, "flaky-table.hbs"),
FlakyRateTable: join(basePath, "flaky-rate-table.hbs"),
AiTable: join(basePath, "ai-table.hbs"),
AiSummaryReport: join(basePath, "ai-summary-report.hbs"),
PreviousResultsTable: join(basePath, "previous-results-table.hbs"),
PullRequest: join(basePath, "pull-request.hbs"),
SuiteFolded: join(basePath, "suite-folded.hbs"),
SuiteList: join(basePath, "suite-list.hbs"),
CommitTable: join(basePath, "commit-table.hbs"),
InsightsTable: join(basePath, "insights-table.hbs"),
SlowestTable: join(basePath, "slowest-table.hbs"),
GitHub: join(basePath, "github.hbs"),
FileTable: join(basePath, "file-table.hbs"),
} as const;
export function getBasePath(report: "reports" | "community-reports"): string {
const actionPath = join(import.meta.dirname, report);
if (existsSync(actionPath)) {
return actionPath;
}
return import.meta.dirname;
}