astro/packages/integrations/netlify/test/edge-functions/root-dynamic.test.ts
Ben Holmes fca58cfd91
Fix: Netlify edge deployment when using markdown (#3612)
* wip: revert sitemap PR

* fix: extract SSR-ready "slug" helper to separate module

* Un-revert sitemap PR. Not to blame!

This reverts commit 7cd2a8a5ea.

* fix: use .netlify for edge deployment test

* refactor: add md file to edge function fixture

* fix: add netlify edge tests to ci

* chore: remove stray console log

* wip: undo "dist" change on edge tests

* chore: changeset

* Revert "wip: undo "dist" change on edge tests"

This reverts commit 70e565ef06.

* temp: add ignore to breaking edge tests
2022-06-16 20:31:08 -04:00

20 lines
649 B
TypeScript

// @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/');
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();
},
});