From 30f89ee732291bb76a45a277014dc773cbd917dc Mon Sep 17 00:00:00 2001 From: Wes Johnson Date: Tue, 6 Feb 2024 18:30:09 -0500 Subject: [PATCH] fix fixture for stats work --- site/src/lib/server/__fixtures__/data.json | 7 +++++++ site/src/lib/server/timeline.test.ts | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/site/src/lib/server/__fixtures__/data.json b/site/src/lib/server/__fixtures__/data.json index 2fddfe0..8329812 100644 --- a/site/src/lib/server/__fixtures__/data.json +++ b/site/src/lib/server/__fixtures__/data.json @@ -94,6 +94,13 @@ "2023-12-30", "2023-12-31" ], + "latest": { + "lastReportDate": "2024-02-06", + "gazaKilled": 27585, + "gazaInjured": 66978, + "gazaChildren": 12000, + "gazaWomen": 8190 + }, "killed": [ 198, 256, 436, 765, 1055, 1203, 1709, 2215, 2450, 2808, 3006, 3478, 3785, 4137, 4385, 4651, 5087, 5791, 6546, 7028, 7326, 7703, 8005, 8306, 8525, diff --git a/site/src/lib/server/timeline.test.ts b/site/src/lib/server/timeline.test.ts index 1a71d9d..ea440ea 100644 --- a/site/src/lib/server/timeline.test.ts +++ b/site/src/lib/server/timeline.test.ts @@ -8,11 +8,14 @@ test("timeline datamodel integration", () => { const posts = getEnhancedPosts( require("../../content/enabler/tal-broda.json").posts ); - const svgDomain = getSvgDomain(() => dataFixture); + + const dataFetcher = () => dataFixture; + + const svgDomain = getSvgDomain(); const timeline = getTimeline({ svgDomain, posts, - dataFetcher: () => dataFixture, + dataFetcher, }); expect(timeline).toMatchSnapshot();