diff options
author | 2022-08-17 00:08:40 +1000 | |
---|---|---|
committer | 2022-08-16 10:08:40 -0400 | |
commit | 45fdbc4650610bd8363a05c07f3863cc12391b28 (patch) | |
tree | 603e76e5c3bbfbfc45b08d21e19776df3bafa190 /packages/integrations/deno/test/basics.test.js | |
parent | 166b3b8a544e6ba8f6a32960cf9c73bbb88c8b34 (diff) | |
download | astro-45fdbc4650610bd8363a05c07f3863cc12391b28.tar.gz astro-45fdbc4650610bd8363a05c07f3863cc12391b28.tar.zst astro-45fdbc4650610bd8363a05c07f3863cc12391b28.zip |
Don’t use Buffer.byteLength() as Deno can’t use it (#4324)
* Don’t use Buffer.byteLength() as Deno can’t use it
* Add changeset
* Add tests for Markdown & MDX with Deno
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Diffstat (limited to 'packages/integrations/deno/test/basics.test.js')
-rw-r--r-- | packages/integrations/deno/test/basics.test.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/packages/integrations/deno/test/basics.test.js b/packages/integrations/deno/test/basics.test.js index 4a368e32d..aee9dd1f3 100644 --- a/packages/integrations/deno/test/basics.test.js +++ b/packages/integrations/deno/test/basics.test.js @@ -59,3 +59,31 @@ Deno.test({ }); }, }); + +Deno.test({ + name: 'Works with Markdown', + async fn() { + await startApp(async () => { + const resp = await fetch('http://127.0.0.1:8085/markdown'); + const html = await resp.text(); + + const doc = new DOMParser().parseFromString(html, `text/html`); + const h1 = doc.querySelector('h1'); + assertEquals(h1.innerText, 'Heading from Markdown'); + }); + }, +}); + +Deno.test({ + name: 'Works with MDX', + async fn() { + await startApp(async () => { + const resp = await fetch('http://127.0.0.1:8085/mdx'); + const html = await resp.text(); + + const doc = new DOMParser().parseFromString(html, `text/html`); + const h1 = doc.querySelector('h1'); + assertEquals(h1.innerText, 'Heading from MDX'); + }); + }, +}); |