0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages/integrations/netlify/test/edge-functions/root-dynamic.test.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
649 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({
// TODO: debug why build cannot be found in "await import"
ignore: true,
name: 'Assets are preferred over HTML routes',
async fn() {
let close = await runBuild('./fixtures/root-dynamic/');
2022-04-22 09:04:54 -05:00
const { default: handler } = await import(
'./fixtures/root-dynamic/.netlify/edge-functions/entry.js'
2022-04-22 09:04:54 -05:00
);
const response = await handler(new Request('http://example.com/styles.css'));
assertEquals(response, undefined, 'No response because this is an asset');
await close();
},
});