summaryrefslogtreecommitdiff
path: root/packages/integrations/netlify/test/edge-functions/root-dynamic.test.ts
blob: 8e05b05de70a426985ce3e3caf41759517e45df8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// @ts-expect-error
import { runBuild } from './test-utils.ts';
// @ts-expect-error
import { assertEquals, assert, DOMParser } from './deps.ts';

// @ts-expect-error
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();
	},
});