fix(API): Insights - round failure rate to 3 decimals (#14325)

This commit is contained in:
Guillaume Jacquart
2025-04-01 17:23:08 +02:00
committed by GitHub
parent 08450b20af
commit cf37ee3ced
3 changed files with 8 additions and 8 deletions

View File

@@ -58,7 +58,7 @@ describe('InsightsController', () => {
expect(response).toEqual({
total: { deviation: null, unit: 'count', value: 30 },
failed: { deviation: null, unit: 'count', value: 10 },
failureRate: { deviation: null, unit: 'ratio', value: 0.33 },
failureRate: { deviation: null, unit: 'ratio', value: 0.333 },
averageRunTime: { deviation: null, unit: 'time', value: 10 },
timeSaved: { deviation: null, unit: 'time', value: 10 },
});
@@ -84,7 +84,7 @@ describe('InsightsController', () => {
expect(response).toEqual({
total: { deviation: 10, unit: 'count', value: 30 },
failed: { deviation: 6, unit: 'count', value: 10 },
failureRate: { deviation: 0.33 - 0.2, unit: 'ratio', value: 0.33 },
failureRate: { deviation: 0.333 - 0.2, unit: 'ratio', value: 0.333 },
averageRunTime: { deviation: 300 / 30 - 40 / 20, unit: 'time', value: 10 },
timeSaved: { deviation: 5, unit: 'time', value: 10 },
});