mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
24 lines
1 KiB
JavaScript
24 lines
1 KiB
JavaScript
import assert from 'node:assert/strict';
|
|
import { before, 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">'));
|
|
});
|
|
});
|