From b4e55c2027e50f814f22d58c99efd62854a22f24 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Wed, 16 Oct 2024 13:47:46 +0200 Subject: [PATCH] backport fixes from PR#10452 missing in merge e839b6307 --- modules/globals.d.ts | 2 +- test/spec_helpers.mts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/globals.d.ts b/modules/globals.d.ts index 0ebc75ebb8..aa64619bcb 100644 --- a/modules/globals.d.ts +++ b/modules/globals.d.ts @@ -2,7 +2,7 @@ import type { FetchMockStatic } from 'fetch-mock'; declare global { declare var iD: typeof import('.'); - declare var d3: import('d3'); + declare var d3: typeof import('d3'); declare var fetchMock: FetchMockStatic; declare var before: typeof beforeEach; declare var after: typeof afterEach; diff --git a/test/spec_helpers.mts b/test/spec_helpers.mts index 65dfc79901..149a6f69fb 100644 --- a/test/spec_helpers.mts +++ b/test/spec_helpers.mts @@ -131,10 +131,11 @@ cached.deprecated = []; // Initializing `coreContext` initializes `_uploader`, which tries loading: cached.discarded = {}; +// @ts-expect-error window.d3 = iD.d3; // Remove this if we can avoid exporting all of d3.js // @ts-expect-error -delete window.PointerEvent; // force the browser to use mouse events +delete window.PointerEvent; // force the browser to use mouse events // some sticky fallbacks const capabilities = `