From 9fdbec00eecec80584606a4f0bc040c042b0cf6b Mon Sep 17 00:00:00 2001 From: imccyu <276526105+imccyu@users.noreply.github.com> Date: Thu, 27 Aug 2026 03:06:59 +0800 Subject: [PATCH] fix(web): reuse the preview Remote helper --- apps/web/tests/preview-boot.e2e.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/apps/web/tests/preview-boot.e2e.ts b/apps/web/tests/preview-boot.e2e.ts index cf7a720ac8..9ffb31a2ae 100644 --- a/apps/web/tests/preview-boot.e2e.ts +++ b/apps/web/tests/preview-boot.e2e.ts @@ -365,21 +365,6 @@ async function bootPreview(origin: string, browser: Browser): Promise { // Settings and credentials both answer over the Remote carrier, so this // half of the sweep posts the generated endpoints directly like the // session read above. - const remote = async (endpoint: string, args: object): Promise => { - const answered = await transport.fetch(`/api/${endpoint}`, { - method: 'POST', - headers: { 'content-type': 'application/json' }, - body: JSON.stringify({ - type: 'client-request', - rpcId: `preview-${endpoint.replace('/', '-')}`, - method: endpoint, - payload: { args }, - }), - }) - const body = await answered.json() as Result - if (!body.result.ok) throw new Error(`${endpoint} failed: ${body.result.error.message}`) - return body.result.value - } const settings = await remote<{ namespaces: { ns: string; revision: number }[] }>( 'settings/describe', {}, )