Skip to content

Commit e6fec66

Browse files
committed
chore: refine Report interface by enforcing specific types for reportFormat and specVersion; adjust Results and Environment interfaces for consistency
1 parent cadb273 commit e6fec66

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

types/ctrf.d.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export interface Report {
2-
reportFormat: string
3-
specVersion: string
2+
reportFormat: "CTRF"
3+
specVersion: `${number}.${number}.${number}`
44
reportId?: string
55
timestamp?: string
66
generatedBy?: string
@@ -13,7 +13,6 @@ export interface Report {
1313
export interface Results {
1414
tool: Tool
1515
summary: Summary
16-
metrics?: Metrics
1716
tests: Test[]
1817
environment?: Environment
1918
extra?: Record<string, unknown>
@@ -26,14 +25,11 @@ export interface Summary {
2625
skipped: number
2726
pending: number
2827
other: number
29-
flaky?: number
28+
flaky: number
3029
suites?: number
3130
start: number
3231
stop: number
33-
extra?: Record<string, unknown>
34-
}
35-
36-
export interface Metrics {
32+
duration: number
3733
passRate?: number
3834
failRate?: number
3935
flakyRate?: number
@@ -88,7 +84,7 @@ export interface Environment {
8884
appVersion?: string
8985
buildId?: string
9086
buildName?: string
91-
buildNumber?: string
87+
buildNumber?: number
9288
buildUrl?: string
9389
repositoryName?: string
9490
repositoryUrl?: string
@@ -168,7 +164,7 @@ export interface Baseline {
168164
source?: string
169165
timestamp?: string
170166
buildName?: string
171-
buildNumber?: string
167+
buildNumber?: number
172168
buildUrl?: string
173169
extra?: Record<string, unknown>
174170
}

0 commit comments

Comments
 (0)