From 26357c4b62056063242a0ae038585184c95c57bf Mon Sep 17 00:00:00 2001 From: Daniel Bachler Date: Wed, 5 Feb 2025 20:43:28 +0100 Subject: [PATCH] fix unit tests --- packages/@ourworldindata/explorer/src/Explorer.tsx | 1 + .../@ourworldindata/grapher/src/core/Grapher.jsdom.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/@ourworldindata/explorer/src/Explorer.tsx b/packages/@ourworldindata/explorer/src/Explorer.tsx index 0ede5e8ea3..6a93f2d2af 100644 --- a/packages/@ourworldindata/explorer/src/Explorer.tsx +++ b/packages/@ourworldindata/explorer/src/Explorer.tsx @@ -212,6 +212,7 @@ export class Explorer isEmbeddedInAnOwidPage: this.props.isEmbeddedInAnOwidPage, adminBaseUrl: this.adminBaseUrl, }) + this.grapher = new Grapher({ grapherState: this.grapherState, }) diff --git a/packages/@ourworldindata/grapher/src/core/Grapher.jsdom.test.ts b/packages/@ourworldindata/grapher/src/core/Grapher.jsdom.test.ts index da249696f3..f7a2558e45 100755 --- a/packages/@ourworldindata/grapher/src/core/Grapher.jsdom.test.ts +++ b/packages/@ourworldindata/grapher/src/core/Grapher.jsdom.test.ts @@ -40,7 +40,7 @@ import { legacyToOwidTableAndDimensionsWithMandatorySlug } from "./LegacyToOwidT const TestGrapherConfig = (): { table: OwidTable - selection: any[] + selectedEntityNames: any[] dimensions: { slug: SampleColumnSlugs property: DimensionProperty @@ -50,7 +50,7 @@ const TestGrapherConfig = (): { const table = SynthesizeGDPTable({ entityCount: 10 }) return { table, - selection: table.sampleEntityName(5), + selectedEntityNames: table.sampleEntityName(5), dimensions: [ { slug: SampleColumnSlugs.GDP,