2023-03-07 13:41:24 +00:00
|
|
|
// @ts-expect-error
|
2023-02-21 14:14:47 +00:00
|
|
|
import { runBuild } from './test-utils.ts';
|
2023-03-07 13:41:24 +00:00
|
|
|
// @ts-expect-error
|
2023-02-21 14:14:47 +00:00
|
|
|
import { assertEquals } from './deps.ts';
|
|
|
|
|
2023-03-07 13:41:24 +00:00
|
|
|
// @ts-expect-error
|
2023-02-21 14:14:47 +00:00
|
|
|
Deno.test({
|
|
|
|
name: 'Prerender',
|
|
|
|
async fn() {
|
|
|
|
let close = await runBuild('./fixtures/prerender/');
|
|
|
|
const { default: handler } = await import(
|
2023-04-10 08:50:54 +00:00
|
|
|
'./fixtures/prerender/.netlify/edge-functions/entry.js'
|
2023-02-21 14:14:47 +00:00
|
|
|
);
|
|
|
|
const response = await handler(new Request('http://example.com/index.html'));
|
|
|
|
assertEquals(response, undefined, 'No response because this is an asset');
|
|
|
|
await close();
|
|
|
|
},
|
2023-02-21 14:17:00 +00:00
|
|
|
});
|