diff options
author | 2023-02-16 23:16:07 +0800 | |
---|---|---|
committer | 2023-02-16 09:16:07 -0600 | |
commit | ef5cea4dc5c4ffa33bd57ea0886e6912afb24fec (patch) | |
tree | 681c11211a396616ac48fe0cf10fcbca96b521db /packages/integrations/deno/test/basics.test.ts | |
parent | 0049fda62fa8650a0d250adb00a2c5d82679aeaf (diff) | |
download | astro-ef5cea4dc5c4ffa33bd57ea0886e6912afb24fec.tar.gz astro-ef5cea4dc5c4ffa33bd57ea0886e6912afb24fec.tar.zst astro-ef5cea4dc5c4ffa33bd57ea0886e6912afb24fec.zip |
Deno fix #6131 (#6248)
* fix: #6131
* fix: delete
* update code
* fix: fix bug
* add some tests
* fix route error
* delete comment
* delete trash code
---------
Co-authored-by: wuls <linsheng.wu@beantechs.com>
Diffstat (limited to 'packages/integrations/deno/test/basics.test.ts')
-rw-r--r-- | packages/integrations/deno/test/basics.test.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/integrations/deno/test/basics.test.ts b/packages/integrations/deno/test/basics.test.ts index d1f8907cb..e61dbd3f7 100644 --- a/packages/integrations/deno/test/basics.test.ts +++ b/packages/integrations/deno/test/basics.test.ts @@ -143,3 +143,24 @@ Deno.test({ sanitizeResources: false, sanitizeOps: false, }); + +Deno.test({ + name: 'perendering', + permissions: defaultTestPermissions, + async fn() { + await startApp(async (baseUrl: URL) => { + const resp = await fetch(new URL('perendering', baseUrl)); + assertEquals(resp.status, 200); + + + const html = await resp.text(); + assert(html); + + const doc = new DOMParser().parseFromString(html, `text/html`); + const h1 = doc!.querySelector('h1'); + assertEquals(h1!.innerText, 'test'); + }); + }, + sanitizeResources: false, + sanitizeOps: false, +}); |