diff options
author | 2022-10-07 13:38:38 +0000 | |
---|---|---|
committer | 2022-10-07 13:38:38 +0000 | |
commit | 358ffb541d53911d3996eca6317748d1f4a7da3e (patch) | |
tree | 788246cc48ef46aabd8cf2ae9b091cfa21284156 /packages/integrations/deno/test | |
parent | 4393bd6710f8d24d61be8b10b633fe374f1b2a7e (diff) | |
download | astro-358ffb541d53911d3996eca6317748d1f4a7da3e.tar.gz astro-358ffb541d53911d3996eca6317748d1f4a7da3e.tar.zst astro-358ffb541d53911d3996eca6317748d1f4a7da3e.zip |
[ci] format
Diffstat (limited to '')
-rw-r--r-- | packages/integrations/deno/test/basics.test.ts | 18 | ||||
-rw-r--r-- | packages/integrations/deno/test/dynamic-import.test.ts | 6 | ||||
-rw-r--r-- | packages/integrations/deno/test/helpers.ts | 13 |
3 files changed, 20 insertions, 17 deletions
diff --git a/packages/integrations/deno/test/basics.test.ts b/packages/integrations/deno/test/basics.test.ts index 5449788d7..9c55397c2 100644 --- a/packages/integrations/deno/test/basics.test.ts +++ b/packages/integrations/deno/test/basics.test.ts @@ -1,6 +1,6 @@ import { StartServerCallback, runBuildAndStartApp, defaultTestPermissions } from './helpers.ts'; -import { DOMParser } from "https://deno.land/x/deno_dom@v0.1.35-alpha/deno-dom-wasm.ts"; -import { assert, assertEquals } from "https://deno.land/std@0.158.0/testing/asserts.ts"; +import { DOMParser } from 'https://deno.land/x/deno_dom@v0.1.35-alpha/deno-dom-wasm.ts'; +import { assert, assertEquals } from 'https://deno.land/std@0.158.0/testing/asserts.ts'; async function startApp(cb: StartServerCallback) { await runBuildAndStartApp('./fixtures/basics/', cb); @@ -30,7 +30,7 @@ Deno.test({ }); }, sanitizeResources: false, - sanitizeOps: false + sanitizeOps: false, }); Deno.test({ @@ -38,7 +38,7 @@ Deno.test({ permissions: defaultTestPermissions, async fn() { await startApp(async (baseUrl: URL) => { - const resp = await fetch(new URL("this-does-not-exist", baseUrl)); + const resp = await fetch(new URL('this-does-not-exist', baseUrl)); assertEquals(resp.status, 404); const html = await resp.text(); @@ -50,7 +50,7 @@ Deno.test({ }); }, sanitizeResources: false, - sanitizeOps: false + sanitizeOps: false, }); Deno.test({ @@ -73,7 +73,7 @@ Deno.test({ }); }, sanitizeResources: false, - sanitizeOps: false + sanitizeOps: false, }); Deno.test({ @@ -90,7 +90,7 @@ Deno.test({ }); }, sanitizeResources: false, - sanitizeOps: false + sanitizeOps: false, }); Deno.test({ @@ -107,7 +107,7 @@ Deno.test({ }); }, sanitizeResources: false, - sanitizeOps: false + sanitizeOps: false, }); Deno.test({ @@ -124,5 +124,5 @@ Deno.test({ }); }, sanitizeResources: false, - sanitizeOps: false + sanitizeOps: false, }); diff --git a/packages/integrations/deno/test/dynamic-import.test.ts b/packages/integrations/deno/test/dynamic-import.test.ts index 5b8cd043a..1562a5771 100644 --- a/packages/integrations/deno/test/dynamic-import.test.ts +++ b/packages/integrations/deno/test/dynamic-import.test.ts @@ -1,6 +1,6 @@ -import { DOMParser } from "https://deno.land/x/deno_dom@v0.1.35-alpha/deno-dom-wasm.ts"; -import { assert, assertEquals } from "https://deno.land/std@0.158.0/testing/asserts.ts"; -import { StartServerCallback, runBuildAndStartAppFromSubprocess } from "./helpers.ts"; +import { DOMParser } from 'https://deno.land/x/deno_dom@v0.1.35-alpha/deno-dom-wasm.ts'; +import { assert, assertEquals } from 'https://deno.land/std@0.158.0/testing/asserts.ts'; +import { StartServerCallback, runBuildAndStartAppFromSubprocess } from './helpers.ts'; async function startApp(cb: StartServerCallback) { await runBuildAndStartAppFromSubprocess('./fixtures/dynimport/', cb); diff --git a/packages/integrations/deno/test/helpers.ts b/packages/integrations/deno/test/helpers.ts index 4b65d210c..e69abbebb 100644 --- a/packages/integrations/deno/test/helpers.ts +++ b/packages/integrations/deno/test/helpers.ts @@ -1,15 +1,15 @@ import { fromFileUrl } from 'https://deno.land/std@0.110.0/path/mod.ts'; -import { assert } from "https://deno.land/std@0.158.0/testing/asserts.ts"; +import { assert } from 'https://deno.land/std@0.158.0/testing/asserts.ts'; import { readableStreamFromReader } from 'https://deno.land/std@0.142.0/streams/conversion.ts'; const dir = new URL('./', import.meta.url); -const defaultURL = new URL("http://localhost:8085/"); +const defaultURL = new URL('http://localhost:8085/'); export const defaultTestPermissions: Deno.PermissionOptions = { read: true, net: true, run: true, - env: true + env: true, }; export declare type StartServerCallback = (url: URL) => Promise<void>; @@ -22,7 +22,7 @@ export async function runBuild(fixturePath: string) { }); try { const status = await proc.status(); - assert(status.success) + assert(status.success); } finally { proc.close(); } @@ -72,7 +72,10 @@ export async function runBuildAndStartApp(fixturePath: string, cb: StartServerCa } } -export async function runBuildAndStartAppFromSubprocess(fixturePath: string, cb: StartServerCallback) { +export async function runBuildAndStartAppFromSubprocess( + fixturePath: string, + cb: StartServerCallback +) { const url = new URL(fixturePath, dir); await runBuild(fixturePath); |