From 0ad6a5e2d81813d7927062ce8ec39b94539e3d2e Mon Sep 17 00:00:00 2001 From: Arsh <69170106+lilnasy@users.noreply.github.com> Date: Wed, 16 Aug 2023 16:47:18 +0530 Subject: [PATCH] chore(test): remove duplicates fixtures (#8098) --- .../astro/test/css-inline-stylesheets.test.js | 36 ++++++-- .../css-inline-stylesheets/auto/package.json | 8 -- .../auto/src/components/Button.astro | 86 ------------------- .../auto/src/content/en/endeavour.md | 15 ---- .../auto/src/imported.css | 15 ---- .../auto/src/layouts/Layout.astro | 35 -------- .../auto/src/pages/index.astro | 17 ---- .../css-inline-stylesheets/never/package.json | 8 -- .../never/src/components/Button.astro | 86 ------------------- .../never/src/content/en/endeavour.md | 15 ---- .../never/src/imported.css | 15 ---- .../never/src/layouts/Layout.astro | 35 -------- .../never/src/pages/index.astro | 17 ---- .../{always => }/package.json | 0 .../{always => }/src/components/Button.astro | 0 .../{always => }/src/content/en/endeavour.md | 0 .../{always => }/src/imported.css | 0 .../{always => }/src/layouts/Layout.astro | 0 .../{always => }/src/pages/index.astro | 0 pnpm-lock.yaml | 20 +---- 20 files changed, 32 insertions(+), 376 deletions(-) delete mode 100644 packages/astro/test/fixtures/css-inline-stylesheets/auto/package.json delete mode 100644 packages/astro/test/fixtures/css-inline-stylesheets/auto/src/components/Button.astro delete mode 100644 packages/astro/test/fixtures/css-inline-stylesheets/auto/src/content/en/endeavour.md delete mode 100644 packages/astro/test/fixtures/css-inline-stylesheets/auto/src/imported.css delete mode 100644 packages/astro/test/fixtures/css-inline-stylesheets/auto/src/layouts/Layout.astro delete mode 100644 packages/astro/test/fixtures/css-inline-stylesheets/auto/src/pages/index.astro delete mode 100644 packages/astro/test/fixtures/css-inline-stylesheets/never/package.json delete mode 100644 packages/astro/test/fixtures/css-inline-stylesheets/never/src/components/Button.astro delete mode 100644 packages/astro/test/fixtures/css-inline-stylesheets/never/src/content/en/endeavour.md delete mode 100644 packages/astro/test/fixtures/css-inline-stylesheets/never/src/imported.css delete mode 100644 packages/astro/test/fixtures/css-inline-stylesheets/never/src/layouts/Layout.astro delete mode 100644 packages/astro/test/fixtures/css-inline-stylesheets/never/src/pages/index.astro rename packages/astro/test/fixtures/css-inline-stylesheets/{always => }/package.json (100%) rename packages/astro/test/fixtures/css-inline-stylesheets/{always => }/src/components/Button.astro (100%) rename packages/astro/test/fixtures/css-inline-stylesheets/{always => }/src/content/en/endeavour.md (100%) rename packages/astro/test/fixtures/css-inline-stylesheets/{always => }/src/imported.css (100%) rename packages/astro/test/fixtures/css-inline-stylesheets/{always => }/src/layouts/Layout.astro (100%) rename packages/astro/test/fixtures/css-inline-stylesheets/{always => }/src/pages/index.astro (100%) diff --git a/packages/astro/test/css-inline-stylesheets.test.js b/packages/astro/test/css-inline-stylesheets.test.js index 63148bbfd..bcd895a47 100644 --- a/packages/astro/test/css-inline-stylesheets.test.js +++ b/packages/astro/test/css-inline-stylesheets.test.js @@ -8,7 +8,11 @@ describe('Setting inlineStylesheets to never in static output', () => { before(async () => { fixture = await loadFixture({ - root: './fixtures/css-inline-stylesheets/never/', + // inconsequential config that differs between tests + // to bust cache and prevent modules and their state + // from being reused + site: 'https://test.dev/', + root: './fixtures/css-inline-stylesheets/', output: 'static', build: { inlineStylesheets: 'never', @@ -41,7 +45,11 @@ describe('Setting inlineStylesheets to never in server output', () => { before(async () => { const fixture = await loadFixture({ - root: './fixtures/css-inline-stylesheets/never/', + // inconsequential config that differs between tests + // to bust cache and prevent modules and their state + // from being reused + site: 'https://test.dev/', + root: './fixtures/css-inline-stylesheets/', output: 'server', adapter: testAdapter(), build: { @@ -77,7 +85,11 @@ describe('Setting inlineStylesheets to auto in static output', () => { before(async () => { fixture = await loadFixture({ - root: './fixtures/css-inline-stylesheets/auto/', + // inconsequential config that differs between tests + // to bust cache and prevent modules and their state + // from being reused + site: 'https://test.info/', + root: './fixtures/css-inline-stylesheets/', output: 'static', build: { inlineStylesheets: 'auto', @@ -117,7 +129,11 @@ describe('Setting inlineStylesheets to auto in server output', () => { before(async () => { const fixture = await loadFixture({ - root: './fixtures/css-inline-stylesheets/auto/', + // inconsequential config that differs between tests + // to bust cache and prevent modules and their state + // from being reused + site: 'https://test.info/', + root: './fixtures/css-inline-stylesheets/', output: 'server', adapter: testAdapter(), build: { @@ -161,7 +177,11 @@ describe('Setting inlineStylesheets to always in static output', () => { before(async () => { fixture = await loadFixture({ - root: './fixtures/css-inline-stylesheets/always/', + // inconsequential config that differs between tests + // to bust cache and prevent modules and their state + // from being reused + site: 'https://test.net/', + root: './fixtures/css-inline-stylesheets/', output: 'static', build: { inlineStylesheets: 'always', @@ -193,7 +213,11 @@ describe('Setting inlineStylesheets to always in server output', () => { before(async () => { const fixture = await loadFixture({ - root: './fixtures/css-inline-stylesheets/always/', + // inconsequential config that differs between tests + // to bust cache and prevent modules and their state + // from being reused + site: 'https://test.net/', + root: './fixtures/css-inline-stylesheets/', output: 'server', adapter: testAdapter(), build: { diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/auto/package.json b/packages/astro/test/fixtures/css-inline-stylesheets/auto/package.json deleted file mode 100644 index 3eb8e9d51..000000000 --- a/packages/astro/test/fixtures/css-inline-stylesheets/auto/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@test/css-inline-stylesheets-auto", - "version": "0.0.0", - "private": true, - "dependencies": { - "astro": "workspace:*" - } -} diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/components/Button.astro b/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/components/Button.astro deleted file mode 100644 index 3f25cbd3e..000000000 --- a/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/components/Button.astro +++ /dev/null @@ -1,86 +0,0 @@ ---- -const { class: className = '', style, href } = Astro.props; -const { variant = 'primary' } = Astro.props; ---- - - - - - - - - \ No newline at end of file diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/content/en/endeavour.md b/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/content/en/endeavour.md deleted file mode 100644 index 240eeeae3..000000000 --- a/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/content/en/endeavour.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Endeavour -description: 'Learn about the Endeavour NASA space shuttle.' -publishedDate: 'Sun Jul 11 2021 00:00:00 GMT-0400 (Eastern Daylight Time)' -layout: '../../layouts/Layout.astro' -tags: [space, 90s] ---- - -**Source:** [Wikipedia](https://en.wikipedia.org/wiki/Space_Shuttle_Endeavour) - -Space Shuttle Endeavour (Orbiter Vehicle Designation: OV-105) is a retired orbiter from NASA's Space Shuttle program and the fifth and final operational Shuttle built. It embarked on its first mission, STS-49, in May 1992 and its 25th and final mission, STS-134, in May 2011. STS-134 was expected to be the final mission of the Space Shuttle program, but with the authorization of STS-135, Atlantis became the last shuttle to fly. - -The United States Congress approved the construction of Endeavour in 1987 to replace the Space Shuttle Challenger, which was destroyed in 1986. - -NASA chose, on cost grounds, to build much of Endeavour from spare parts rather than refitting the Space Shuttle Enterprise, and used structural spares built during the construction of Discovery and Atlantis in its assembly. \ No newline at end of file diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/imported.css b/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/imported.css deleted file mode 100644 index 3959523ff..000000000 --- a/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/imported.css +++ /dev/null @@ -1,15 +0,0 @@ -.bg-skyblue { - background: skyblue; -} - -.bg-lightcoral { - background: lightcoral; -} - -.red { - color: darkred; -} - -.blue { - color: royalblue; -} diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/layouts/Layout.astro b/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/layouts/Layout.astro deleted file mode 100644 index 0a2665518..000000000 --- a/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/layouts/Layout.astro +++ /dev/null @@ -1,35 +0,0 @@ ---- -import Button from '../components/Button.astro'; -import '../imported.css'; - -interface Props { - title: string; -} - -const { title } = Astro.props; ---- - - - - - - - - - {title} - - - - - - - diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/pages/index.astro b/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/pages/index.astro deleted file mode 100644 index bfdbeb5f8..000000000 --- a/packages/astro/test/fixtures/css-inline-stylesheets/auto/src/pages/index.astro +++ /dev/null @@ -1,17 +0,0 @@ ---- -import Button from '../components/Button.astro'; -import { getEntryBySlug } from 'astro:content'; - -const entry = await getEntryBySlug('en', 'endeavour'); -const { Content } = await entry.render(); ---- - -
-

Welcome to Astro

- - -
diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/never/package.json b/packages/astro/test/fixtures/css-inline-stylesheets/never/package.json deleted file mode 100644 index 382288fbc..000000000 --- a/packages/astro/test/fixtures/css-inline-stylesheets/never/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@test/css-inline-stylesheets-never", - "version": "0.0.0", - "private": true, - "dependencies": { - "astro": "workspace:*" - } -} diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/never/src/components/Button.astro b/packages/astro/test/fixtures/css-inline-stylesheets/never/src/components/Button.astro deleted file mode 100644 index 3f25cbd3e..000000000 --- a/packages/astro/test/fixtures/css-inline-stylesheets/never/src/components/Button.astro +++ /dev/null @@ -1,86 +0,0 @@ ---- -const { class: className = '', style, href } = Astro.props; -const { variant = 'primary' } = Astro.props; ---- - - - - - - - - \ No newline at end of file diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/never/src/content/en/endeavour.md b/packages/astro/test/fixtures/css-inline-stylesheets/never/src/content/en/endeavour.md deleted file mode 100644 index 240eeeae3..000000000 --- a/packages/astro/test/fixtures/css-inline-stylesheets/never/src/content/en/endeavour.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Endeavour -description: 'Learn about the Endeavour NASA space shuttle.' -publishedDate: 'Sun Jul 11 2021 00:00:00 GMT-0400 (Eastern Daylight Time)' -layout: '../../layouts/Layout.astro' -tags: [space, 90s] ---- - -**Source:** [Wikipedia](https://en.wikipedia.org/wiki/Space_Shuttle_Endeavour) - -Space Shuttle Endeavour (Orbiter Vehicle Designation: OV-105) is a retired orbiter from NASA's Space Shuttle program and the fifth and final operational Shuttle built. It embarked on its first mission, STS-49, in May 1992 and its 25th and final mission, STS-134, in May 2011. STS-134 was expected to be the final mission of the Space Shuttle program, but with the authorization of STS-135, Atlantis became the last shuttle to fly. - -The United States Congress approved the construction of Endeavour in 1987 to replace the Space Shuttle Challenger, which was destroyed in 1986. - -NASA chose, on cost grounds, to build much of Endeavour from spare parts rather than refitting the Space Shuttle Enterprise, and used structural spares built during the construction of Discovery and Atlantis in its assembly. \ No newline at end of file diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/never/src/imported.css b/packages/astro/test/fixtures/css-inline-stylesheets/never/src/imported.css deleted file mode 100644 index 3959523ff..000000000 --- a/packages/astro/test/fixtures/css-inline-stylesheets/never/src/imported.css +++ /dev/null @@ -1,15 +0,0 @@ -.bg-skyblue { - background: skyblue; -} - -.bg-lightcoral { - background: lightcoral; -} - -.red { - color: darkred; -} - -.blue { - color: royalblue; -} diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/never/src/layouts/Layout.astro b/packages/astro/test/fixtures/css-inline-stylesheets/never/src/layouts/Layout.astro deleted file mode 100644 index 0a2665518..000000000 --- a/packages/astro/test/fixtures/css-inline-stylesheets/never/src/layouts/Layout.astro +++ /dev/null @@ -1,35 +0,0 @@ ---- -import Button from '../components/Button.astro'; -import '../imported.css'; - -interface Props { - title: string; -} - -const { title } = Astro.props; ---- - - - - - - - - - {title} - - - - - - - diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/never/src/pages/index.astro b/packages/astro/test/fixtures/css-inline-stylesheets/never/src/pages/index.astro deleted file mode 100644 index bfdbeb5f8..000000000 --- a/packages/astro/test/fixtures/css-inline-stylesheets/never/src/pages/index.astro +++ /dev/null @@ -1,17 +0,0 @@ ---- -import Button from '../components/Button.astro'; -import { getEntryBySlug } from 'astro:content'; - -const entry = await getEntryBySlug('en', 'endeavour'); -const { Content } = await entry.render(); ---- - -
-

Welcome to Astro

- - -
diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/always/package.json b/packages/astro/test/fixtures/css-inline-stylesheets/package.json similarity index 100% rename from packages/astro/test/fixtures/css-inline-stylesheets/always/package.json rename to packages/astro/test/fixtures/css-inline-stylesheets/package.json diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/always/src/components/Button.astro b/packages/astro/test/fixtures/css-inline-stylesheets/src/components/Button.astro similarity index 100% rename from packages/astro/test/fixtures/css-inline-stylesheets/always/src/components/Button.astro rename to packages/astro/test/fixtures/css-inline-stylesheets/src/components/Button.astro diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/always/src/content/en/endeavour.md b/packages/astro/test/fixtures/css-inline-stylesheets/src/content/en/endeavour.md similarity index 100% rename from packages/astro/test/fixtures/css-inline-stylesheets/always/src/content/en/endeavour.md rename to packages/astro/test/fixtures/css-inline-stylesheets/src/content/en/endeavour.md diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/always/src/imported.css b/packages/astro/test/fixtures/css-inline-stylesheets/src/imported.css similarity index 100% rename from packages/astro/test/fixtures/css-inline-stylesheets/always/src/imported.css rename to packages/astro/test/fixtures/css-inline-stylesheets/src/imported.css diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/always/src/layouts/Layout.astro b/packages/astro/test/fixtures/css-inline-stylesheets/src/layouts/Layout.astro similarity index 100% rename from packages/astro/test/fixtures/css-inline-stylesheets/always/src/layouts/Layout.astro rename to packages/astro/test/fixtures/css-inline-stylesheets/src/layouts/Layout.astro diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/always/src/pages/index.astro b/packages/astro/test/fixtures/css-inline-stylesheets/src/pages/index.astro similarity index 100% rename from packages/astro/test/fixtures/css-inline-stylesheets/always/src/pages/index.astro rename to packages/astro/test/fixtures/css-inline-stylesheets/src/pages/index.astro diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 03437ad8d..8eaf40cbe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2443,23 +2443,11 @@ importers: specifier: workspace:* version: link:../../.. - packages/astro/test/fixtures/css-inline-stylesheets/always: + packages/astro/test/fixtures/css-inline-stylesheets: dependencies: astro: specifier: workspace:* - version: link:../../../.. - - packages/astro/test/fixtures/css-inline-stylesheets/auto: - dependencies: - astro: - specifier: workspace:* - version: link:../../../.. - - packages/astro/test/fixtures/css-inline-stylesheets/never: - dependencies: - astro: - specifier: workspace:* - version: link:../../../.. + version: link:../../.. packages/astro/test/fixtures/css-no-code-split: dependencies: @@ -18556,25 +18544,21 @@ packages: file:packages/astro/test/fixtures/css-assets/packages/font-awesome: resolution: {directory: packages/astro/test/fixtures/css-assets/packages/font-awesome, type: directory} name: '@test/astro-font-awesome-package' - version: 0.0.1 dev: false file:packages/astro/test/fixtures/multiple-renderers/renderers/one: resolution: {directory: packages/astro/test/fixtures/multiple-renderers/renderers/one, type: directory} name: '@test/astro-renderer-one' - version: 1.0.0 dev: false file:packages/astro/test/fixtures/multiple-renderers/renderers/two: resolution: {directory: packages/astro/test/fixtures/multiple-renderers/renderers/two, type: directory} name: '@test/astro-renderer-two' - version: 1.0.0 dev: false file:packages/astro/test/fixtures/solid-component/deps/solid-jsx-component: resolution: {directory: packages/astro/test/fixtures/solid-component/deps/solid-jsx-component, type: directory} name: '@test/solid-jsx-component' - version: 0.0.0 dependencies: solid-js: 1.7.6 dev: false