2023-02-21 14:14:47 +00:00
|
|
|
import { runBuild } from './test-utils.ts';
|
|
|
|
import { assertEquals } from './deps.ts';
|
|
|
|
|
|
|
|
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
|
|
|
});
|