astro/packages/integrations/netlify/test/edge-functions/root-dynamic.test.ts
2023-05-01 10:41:09 -04:00

17 lines
607 B
TypeScript

import { runBuild } from './test-utils.ts';
import { assertEquals, assert, DOMParser } from './deps.ts';
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/');
const { default: handler } = await import(
'./fixtures/root-dynamic/.netlify/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();
},
});