diff options
Diffstat (limited to 'packages/integrations/vercel/test')
9 files changed, 0 insertions, 117 deletions
diff --git a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-server/astro.config.mjs b/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-server/astro.config.mjs deleted file mode 100644 index 794734f78..000000000 --- a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-server/astro.config.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import vercel from '@astrojs/vercel/serverless'; -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - adapter: vercel({ - speedInsights: { - enabled: true - } - }) -}); diff --git a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-server/package.json b/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-server/package.json deleted file mode 100644 index 4e674fa6d..000000000 --- a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-server/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "@test/astro-vercel-with-speed-insights-enabled-output-as-server", - "version": "0.0.0", - "private": true, - "dependencies": { - "@astrojs/vercel": "workspace:*", - "astro": "^5.0.0-alpha.8" - } -} diff --git a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-server/src/pages/one.astro b/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-server/src/pages/one.astro deleted file mode 100644 index 0c7fb90a7..000000000 --- a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-server/src/pages/one.astro +++ /dev/null @@ -1,8 +0,0 @@ -<html> - <head> - <title>One</title> - </head> - <body> - <h1>One</h1> - </body> -</html> diff --git a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-server/src/pages/two.astro b/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-server/src/pages/two.astro deleted file mode 100644 index e7ba9910e..000000000 --- a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-server/src/pages/two.astro +++ /dev/null @@ -1,8 +0,0 @@ -<html> - <head> - <title>Two</title> - </head> - <body> - <h1>Two</h1> - </body> -</html> diff --git a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-static/astro.config.mjs b/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-static/astro.config.mjs deleted file mode 100644 index 589aa3662..000000000 --- a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-static/astro.config.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import vercel from '@astrojs/vercel/static'; -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - adapter: vercel({ - speedInsights: { - enabled: true - } - }) -}); diff --git a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-static/package.json b/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-static/package.json deleted file mode 100644 index fd4b24faa..000000000 --- a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-static/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "@test/astro-vercel-with-speed-insights-enabled-output-as-static", - "version": "0.0.0", - "private": true, - "dependencies": { - "@astrojs/vercel": "workspace:*", - "astro": "^5.0.0-alpha.8" - } -} diff --git a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-static/src/pages/one.astro b/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-static/src/pages/one.astro deleted file mode 100644 index 0c7fb90a7..000000000 --- a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-static/src/pages/one.astro +++ /dev/null @@ -1,8 +0,0 @@ -<html> - <head> - <title>One</title> - </head> - <body> - <h1>One</h1> - </body> -</html> diff --git a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-static/src/pages/two.astro b/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-static/src/pages/two.astro deleted file mode 100644 index e7ba9910e..000000000 --- a/packages/integrations/vercel/test/fixtures/with-speed-insights-enabled/output-as-static/src/pages/two.astro +++ /dev/null @@ -1,8 +0,0 @@ -<html> - <head> - <title>Two</title> - </head> - <body> - <h1>Two</h1> - </body> -</html> diff --git a/packages/integrations/vercel/test/speed-insights.test.js b/packages/integrations/vercel/test/speed-insights.test.js deleted file mode 100644 index 28ca84cd2..000000000 --- a/packages/integrations/vercel/test/speed-insights.test.js +++ /dev/null @@ -1,47 +0,0 @@ -import assert from 'node:assert/strict'; -import { before, describe, it } from 'node:test'; -import { loadFixture } from './test-utils.js'; - -describe('Vercel Speed Insights', () => { - describe('output: server', () => { - /** @type {import('./test-utils.js').Fixture} */ - let fixture; - - before(async () => { - fixture = await loadFixture({ - root: './fixtures/with-speed-insights-enabled/output-as-server/', - output: 'server', - }); - await fixture.build(); - }); - - it('ensures that Vercel Speed Insights is present in the bundle', async () => { - const [page] = await fixture.readdir('../.vercel/output/static/_astro'); - - const bundle = await fixture.readFile(`../.vercel/output/static/_astro/${page}`); - - assert.match(bundle, /VERCEL_ANALYTICS_ID/); - }); - }); - - describe('output: static', () => { - /** @type {import('./test-utils.js').Fixture} */ - let fixture; - - before(async () => { - fixture = await loadFixture({ - root: './fixtures/with-speed-insights-enabled/output-as-static/', - output: 'static', - }); - await fixture.build(); - }); - - it('ensures that Vercel Speed Insights is present in the bundle', async () => { - const [page] = await fixture.readdir('../.vercel/output/static/_astro'); - - const bundle = await fixture.readFile(`../.vercel/output/static/_astro/${page}`); - - assert.match(bundle, /VERCEL_ANALYTICS_ID/); - }); - }); -}); |