From 22fe6cd56fe1bb6d80e1509b89ea6c57a4cf5765 Mon Sep 17 00:00:00 2001 From: khoi <6994441+khoi@users.noreply.github.com> Date: Fri, 7 Aug 2026 09:52:10 +0100 Subject: [PATCH 1/2] test: add durable review fixture --- fixtures/durable-review.ts | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 fixtures/durable-review.ts diff --git a/fixtures/durable-review.ts b/fixtures/durable-review.ts new file mode 100644 index 0000000..28458c4 --- /dev/null +++ b/fixtures/durable-review.ts @@ -0,0 +1,4 @@ +export function averageDuration(durations: number[]) { + const total = durations.reduce((sum, duration) => sum + duration, 0); + return total / (durations.length - 1); +} From 7829731b19b620a8c3027a83e8701ef0095f5cd7 Mon Sep 17 00:00:00 2001 From: khoi <6994441+khoi@users.noreply.github.com> Date: Fri, 7 Aug 2026 09:56:20 +0100 Subject: [PATCH 2/2] test: fix durable review fixture --- fixtures/durable-review.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fixtures/durable-review.ts b/fixtures/durable-review.ts index 28458c4..befba3b 100644 --- a/fixtures/durable-review.ts +++ b/fixtures/durable-review.ts @@ -1,4 +1,7 @@ export function averageDuration(durations: number[]) { + if (durations.length === 0) { + return 0; + } const total = durations.reduce((sum, duration) => sum + duration, 0); - return total / (durations.length - 1); + return total / durations.length; }