Skip to content

Commit a9748ca

Browse files
Feat/metric change (#194)
1 parent bb7a74e commit a9748ca

File tree

16 files changed

+71273
-56544
lines changed

16 files changed

+71273
-56544
lines changed

__tests__/ctrf/report-preparation.test.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,14 @@ describe('addFooterDisplayFlags', () => {
184184
it('should NOT set includeFailedReportAllFooter when tests failed across all runs', () => {
185185
let report = createReportWithPreviousResults()
186186
report.insights = {
187-
flakyRate: { current: 0, previous: 0, change: 0 },
188-
failRate: { current: 0, previous: 0, change: 0 },
189-
averageTestDuration: { current: 0, previous: 0, change: 0 },
190-
averageRunDuration: { current: 0, previous: 0, change: 0 },
187+
flakyRate: { current: 0, baseline: 0, change: 0 },
188+
failRate: { current: 0, baseline: 0, change: 0 },
189+
averageTestDuration: { current: 0, baseline: 0, change: 0 },
190+
averageRunDuration: { current: 0, baseline: 0, change: 0 },
191191
runsAnalyzed: 0,
192192
extra: {
193-
totalFailures: 5,
194-
totalFlakyTests: 0
193+
totalResultsFailed: 5,
194+
totalAttemptsFlaky: 0
195195
}
196196
}
197197

@@ -208,14 +208,14 @@ describe('addFooterDisplayFlags', () => {
208208
it('should NOT set includeFlakyReportAllFooter when flaky tests exist across all runs', () => {
209209
let report = createReportWithPreviousResults()
210210
report.insights = {
211-
flakyRate: { current: 0, previous: 0, change: 0 },
212-
failRate: { current: 0, previous: 0, change: 0 },
213-
averageTestDuration: { current: 0, previous: 0, change: 0 },
214-
averageRunDuration: { current: 0, previous: 0, change: 0 },
211+
flakyRate: { current: 0, baseline: 0, change: 0 },
212+
failRate: { current: 0, baseline: 0, change: 0 },
213+
averageTestDuration: { current: 0, baseline: 0, change: 0 },
214+
averageRunDuration: { current: 0, baseline: 0, change: 0 },
215215
runsAnalyzed: 0,
216216
extra: {
217-
totalFailures: 0,
218-
totalFlakyTests: 3
217+
totalResultsFailed: 0,
218+
totalAttemptsFlaky: 3
219219
}
220220
}
221221

@@ -254,14 +254,14 @@ describe('addFooterDisplayFlags', () => {
254254
let report = createReportWithPreviousResults()
255255
report.results.summary.failed = 2
256256
report.insights = {
257-
flakyRate: { current: 0, previous: 0, change: 0 },
258-
failRate: { current: 0, previous: 0, change: 0 },
259-
averageTestDuration: { current: 0, previous: 0, change: 0 },
260-
averageRunDuration: { current: 0, previous: 0, change: 0 },
257+
flakyRate: { current: 0, baseline: 0, change: 0 },
258+
failRate: { current: 0, baseline: 0, change: 0 },
259+
averageTestDuration: { current: 0, baseline: 0, change: 0 },
260+
averageRunDuration: { current: 0, baseline: 0, change: 0 },
261261
runsAnalyzed: 0,
262262
extra: {
263-
totalFailures: 8,
264-
totalFlakyTests: 0
263+
totalResultsFailed: 8,
264+
totalAttemptsFlaky: 0
265265
}
266266
}
267267
report.results.tests = [
@@ -280,14 +280,14 @@ describe('addFooterDisplayFlags', () => {
280280
it('should handle flaky tests in current AND across all runs', () => {
281281
let report = createReportWithPreviousResults()
282282
report.insights = {
283-
flakyRate: { current: 0, previous: 0, change: 0 },
284-
failRate: { current: 0, previous: 0, change: 0 },
285-
averageTestDuration: { current: 0, previous: 0, change: 0 },
286-
averageRunDuration: { current: 0, previous: 0, change: 0 },
283+
flakyRate: { current: 0, baseline: 0, change: 0 },
284+
failRate: { current: 0, baseline: 0, change: 0 },
285+
averageTestDuration: { current: 0, baseline: 0, change: 0 },
286+
averageRunDuration: { current: 0, baseline: 0, change: 0 },
287287
runsAnalyzed: 0,
288288
extra: {
289-
totalFailures: 0,
290-
totalFlakyTests: 4
289+
totalResultsFailed: 0,
290+
totalAttemptsFlaky: 4
291291
}
292292
}
293293
report.results.tests = [

badges/coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)