From ec428a4cba145c764666c1319dc71826d8d2817e Mon Sep 17 00:00:00 2001 From: cdibble Date: Fri, 5 Jan 2024 16:16:25 -0800 Subject: [PATCH] fix flow again --- src/meta.test.js | 2 +- src/script.test.js | 2 +- src/session.test.js | 2 +- src/tracking.test.js | 2 +- vite.config.js | 2 ++ 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/meta.test.js b/src/meta.test.js index 334d1b48..f8582fbb 100644 --- a/src/meta.test.js +++ b/src/meta.test.js @@ -7,7 +7,7 @@ import { getSDKMeta } from "./meta"; const clientId = "foobar123"; const mockScriptSrc = `https://test.paypal.com/sdk/js?client-id=${clientId}`; -function makeMockScriptElement(src = mockScriptSrc): HTMLCanvasElement { +function makeMockScriptElement(src = mockScriptSrc): HTMLScriptElement { const mockElement = document.createElement("script"); mockElement.setAttribute("src", src); // eslint-disable-next-line compat/compat diff --git a/src/script.test.js b/src/script.test.js index 97569fb0..08c85a99 100644 --- a/src/script.test.js +++ b/src/script.test.js @@ -34,7 +34,7 @@ import { CLIENT_ID_ALIAS } from "./config"; const clientId = "foobar123"; const mockScriptSrc = `https://test.paypal.com/sdk/js?client-id=${clientId}`; -function makeMockScriptElement(src = mockScriptSrc): HTMLCanvasElement { +function makeMockScriptElement(src = mockScriptSrc): HTMLScriptElement { const mockElement = document.createElement("script"); mockElement.setAttribute("src", src); // eslint-disable-next-line compat/compat diff --git a/src/session.test.js b/src/session.test.js index c215b7d2..622520af 100644 --- a/src/session.test.js +++ b/src/session.test.js @@ -12,7 +12,7 @@ import { const clientId = "foobar123"; const mockScriptSrc = `https://test.paypal.com/sdk/js?client-id=${clientId}`; -function makeMockScriptElement(src = mockScriptSrc): HTMLCanvasElement { +function makeMockScriptElement(src = mockScriptSrc): HTMLScriptElement { const mockElement = document.createElement("script"); mockElement.setAttribute("src", src); // eslint-disable-next-line compat/compat diff --git a/src/tracking.test.js b/src/tracking.test.js index 92c5c8e4..709fdce4 100644 --- a/src/tracking.test.js +++ b/src/tracking.test.js @@ -6,7 +6,7 @@ import { getSDKInitTime, setupLogger } from "./tracking"; const clientId = "foobar123"; const mockScriptSrc = `https://test.paypal.com/sdk/js?client-id=${clientId}`; -function makeMockScriptElement(src = mockScriptSrc): HTMLCanvasElement { +function makeMockScriptElement(src = mockScriptSrc): HTMLScriptElement { const mockElement = document.createElement("script"); mockElement.setAttribute("src", src); // eslint-disable-next-line compat/compat diff --git a/vite.config.js b/vite.config.js index a0b063f2..d0d171dd 100644 --- a/vite.config.js +++ b/vite.config.js @@ -31,6 +31,7 @@ const define = { }), }; +// $FlowIssue export default defineConfig({ define, esbuild: { @@ -52,5 +53,6 @@ export default defineConfig({ plugins: [esbuildFlowPlugin()], }, }, + // $FlowIssue plugins: [flowPlugin({ exclude: "" })], });