From 1271d9d7c3e9801b14080ad78044a91daed96d8b Mon Sep 17 00:00:00 2001 From: Elliott Marquez <5981958+e111077@users.noreply.github.com> Date: Mon, 27 Mar 2023 18:54:08 -0700 Subject: [PATCH] remove lit global shim workarounds --- packages/astro/e2e/lit-component.test.js | 5 ----- packages/astro/test/ssr-lit.test.js | 1 - 2 files changed, 6 deletions(-) diff --git a/packages/astro/e2e/lit-component.test.js b/packages/astro/e2e/lit-component.test.js index d73005b278f7d..37f8d9eed8526 100644 --- a/packages/astro/e2e/lit-component.test.js +++ b/packages/astro/e2e/lit-component.test.js @@ -8,10 +8,6 @@ const test = testFactory({ // TODO: configure playwright to handle web component APIs // https://github.com/microsoft/playwright/issues/14241 test.describe('Lit components', () => { - test.beforeAll(() => { - delete globalThis.window; - }); - test.describe('Development', () => { let devServer; const t = test.extend({}); @@ -158,7 +154,6 @@ test.describe('Lit components', () => { const t = test.extend({}); t.beforeAll(async ({ astro }) => { - delete globalThis.window; // Playwright's Node version doesn't have these functions, so stub them. process.stdout.clearLine = () => {}; process.stdout.cursorTo = () => {}; diff --git a/packages/astro/test/ssr-lit.test.js b/packages/astro/test/ssr-lit.test.js index 98d58b395acdd..d9f70fe7e14b2 100644 --- a/packages/astro/test/ssr-lit.test.js +++ b/packages/astro/test/ssr-lit.test.js @@ -25,7 +25,6 @@ describe('Lit integration in SSR', () => { } it('Is able to load', async () => { - delete globalThis.window; // On Windows this results in `ReferenceError: window is not defined` const html = await fetchHTML('/'); const $ = cheerioLoad(html); expect($('#win').text()).to.equal('function');