diff options
| author | Adam Malczewski <[email protected]> | 2026-09-05 01:23:24 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-09-05 01:23:24 +0900 |
| commit | 2f282f1a5c784dff97af7c936ccb43ca2b63f03f (patch) | |
| tree | 651de7d124ae48938b8298a8568da215a1f93acc /src/features | |
| parent | 985116fdc8961e656cd9d3027debcd1a6237d6c2 (diff) | |
| download | dispatch-web-2f282f1a5c784dff97af7c936ccb43ca2b63f03f.tar.gz dispatch-web-2f282f1a5c784dff97af7c936ccb43ca2b63f03f.zip | |
style(layout): biome format plan-02 layout tests
Diffstat (limited to 'src/features')
| -rw-r--r-- | src/features/layout/adapter/http.test.ts | 3 | ||||
| -rw-r--r-- | src/features/layout/logic/migration.test.ts | 8 | ||||
| -rw-r--r-- | src/features/layout/store.test.ts | 14 |
3 files changed, 14 insertions, 11 deletions
diff --git a/src/features/layout/adapter/http.test.ts b/src/features/layout/adapter/http.test.ts index 5b50715..1801ca6 100644 --- a/src/features/layout/adapter/http.test.ts +++ b/src/features/layout/adapter/http.test.ts @@ -16,7 +16,8 @@ function fetchReturning( ): typeof fetch { return async (input: string | URL | Request, init?: RequestInit): Promise<Response> => { if (capture !== undefined) { - capture.url = typeof input === "string" ? input : input instanceof URL ? input.href : input.url; + capture.url = + typeof input === "string" ? input : input instanceof URL ? input.href : input.url; capture.init = init; } return new Response(JSON.stringify(body), { diff --git a/src/features/layout/logic/migration.test.ts b/src/features/layout/logic/migration.test.ts index 0b2b402..9eeeda0 100644 --- a/src/features/layout/logic/migration.test.ts +++ b/src/features/layout/logic/migration.test.ts @@ -1,10 +1,6 @@ -import { describe, expect, it } from "vitest"; import { DEFAULT_LAYOUT } from "@dispatch/layout-contract"; -import { - migrationTree, - sidePanelViews, - storedPanelViews, -} from "./migration"; +import { describe, expect, it } from "vitest"; +import { migrationTree, sidePanelViews, storedPanelViews } from "./migration"; import { overlaySidePanels } from "./seed"; const KNOWN = new Set(["tabs", "model", "extensions", "vision", "tasks"]); diff --git a/src/features/layout/store.test.ts b/src/features/layout/store.test.ts index 7e7d6bc..1d4cdf0 100644 --- a/src/features/layout/store.test.ts +++ b/src/features/layout/store.test.ts @@ -1,7 +1,7 @@ import { DEFAULT_LAYOUT, type LayoutTree } from "@dispatch/layout-contract"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; -import { overlaySidePanels } from "./logic/seed"; import type { LayoutHttp, LayoutHttpResult } from "./adapter/http"; +import { overlaySidePanels } from "./logic/seed"; import { createLayoutStore } from "./store.svelte"; /** @@ -300,7 +300,9 @@ describe("layout store — probe triggers (§2.6)", () => { let absent = true; const served = overlaySidePanels(DEFAULT_LAYOUT, ["extensions"]); const http = fakeHttp(() => - absent ? { ok: false, notFound: true, error: "No layout provider is active" } : { ok: true, tree: served }, + absent + ? { ok: false, notFound: true, error: "No layout provider is active" } + : { ok: true, tree: served }, ); const store = makeStore(http); await store.probe("ws-a"); @@ -315,7 +317,9 @@ describe("layout store — probe triggers (§2.6)", () => { it("a workspace switch resets to the default, probes the NEW workspace, and drops queued edits", async () => { const http = fakeHttp((ws) => - ws === "ws-b" ? { ok: true, tree: overlaySidePanels(DEFAULT_LAYOUT, ["vision"]) } : { ok: true, tree: DEFAULT_LAYOUT }, + ws === "ws-b" + ? { ok: true, tree: overlaySidePanels(DEFAULT_LAYOUT, ["vision"]) } + : { ok: true, tree: DEFAULT_LAYOUT }, ); const store = makeStore(http); await store.probe("ws-a"); @@ -405,7 +409,9 @@ describe("layout store — one-way localStorage migration (§2.7)", () => { const storage = storageWith(["extensions"]); let absent = true; const http = fakeHttp(() => - absent ? { ok: false, notFound: true, error: "No layout provider is active" } : { ok: true, tree: DEFAULT_LAYOUT }, + absent + ? { ok: false, notFound: true, error: "No layout provider is active" } + : { ok: true, tree: DEFAULT_LAYOUT }, ); const store = makeStore(http, { storage }); await store.probe("ws-a", { boot: true }); |
