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