f5afaf2498
* Support re-exporting astro components containing client components * Include metadata for markdown too * Fix ssr, probably * Inject post-build * Remove tagName custom element test * Allows using the constructor for lit elements * Fix hoisted script scanning * Pass through plugin context * Get edge functions working in the edge tests * Fix types for the edge function integration * Upgrade the compiler * Upgrade compiler version * Better release notes for lit * Update .changeset/unlucky-hairs-camp.md Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * Properly test that the draft was not rendered * Prevent from rendering draft posts * Add a changeset about the build perf improvement. Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
28 lines
795 B
TypeScript
28 lines
795 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: 'Edge Basics',
|
|
skip: true,
|
|
async fn() {
|
|
let close = await runBuild('./fixtures/edge-basic/');
|
|
const { default: handler } = await import(
|
|
'./fixtures/edge-basic/.netlify/edge-functions/entry.js'
|
|
);
|
|
const response = await handler(new Request('http://example.com/'));
|
|
assertEquals(response.status, 200);
|
|
const html = await response.text();
|
|
assert(html, 'got some html');
|
|
|
|
const doc = new DOMParser().parseFromString(html, `text/html`)!;
|
|
const div = doc.querySelector('#react');
|
|
assert(div, 'div exists');
|
|
|
|
await close();
|
|
},
|
|
});
|