summaryrefslogtreecommitdiff
path: root/packages/integrations/vercel/test/integration-assets.test.js
diff options
context:
space:
mode:
authorGravatar Emanuele Stoppa <my.burning@gmail.com> 2025-02-07 08:47:40 +0000
committerGravatar GitHub <noreply@github.com> 2025-02-07 08:47:40 +0000
commitefef4136e36b7b272f39ee9e1d173b44c212ec34 (patch)
tree8b87e07aff600b01dbba7f4cfaa8f8ddbfa557a6 /packages/integrations/vercel/test/integration-assets.test.js
parent4e7d97fb09f8180572fca5d823ad8edcda7b50b4 (diff)
parent64b118ac9558287c2da76247d171ae3a88d390e4 (diff)
downloadastro-efef4136e36b7b272f39ee9e1d173b44c212ec34.tar.gz
astro-efef4136e36b7b272f39ee9e1d173b44c212ec34.tar.zst
astro-efef4136e36b7b272f39ee9e1d173b44c212ec34.zip
Merge pull request #13147 from withastro/move-vercel
chore: move Vercel adapter to core monorepo
Diffstat (limited to 'packages/integrations/vercel/test/integration-assets.test.js')
-rw-r--r--packages/integrations/vercel/test/integration-assets.test.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/integrations/vercel/test/integration-assets.test.js b/packages/integrations/vercel/test/integration-assets.test.js
new file mode 100644
index 000000000..4bc4a570a
--- /dev/null
+++ b/packages/integrations/vercel/test/integration-assets.test.js
@@ -0,0 +1,24 @@
+import assert from 'node:assert/strict';
+import { describe, it } from 'node:test';
+import { loadFixture } from './test-utils.js';
+
+describe('Assets generated by integrations', () => {
+ it('moves static assets generated by integrations to the correct location: static output', async () => {
+ const fixture = await loadFixture({
+ root: './fixtures/integration-assets/',
+ });
+ await fixture.build();
+ const sitemap = await fixture.readFile('../.vercel/output/static/sitemap-index.xml');
+ assert(sitemap.includes('<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'));
+ });
+
+ it('moves static assets generated by integrations to the correct location: server output', async () => {
+ const fixture = await loadFixture({
+ root: './fixtures/integration-assets/',
+ output: 'server',
+ });
+ await fixture.build();
+ const sitemap = await fixture.readFile('../.vercel/output/static/sitemap-index.xml');
+ assert(sitemap.includes('<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'));
+ });
+});