astro/packages/integrations/netlify/test/edge-functions/root-dynamic.test.ts

19 lines
570 B
TypeScript
Raw Normal View History

// @ts-ignore
import { runBuild } from './test-utils.ts';
// @ts-ignore
import { assertEquals, assert, DOMParser } from './deps.ts';
// @ts-ignore
Deno.test({
name: 'Assets are preferred over HTML routes',
async fn() {
let close = await runBuild('./fixtures/root-dynamic/');
2022-04-22 14:04:54 +00:00
const { default: handler } = await import(
'./fixtures/root-dynamic/dist/edge-functions/entry.js'
);
const response = await handler(new Request('http://example.com/styles.css'));
assertEquals(response, undefined, 'No response because this is an asset');
await close();
},
});