Skip to content

Commit 438588d

Browse files
committed
test(desktop): mark the E2E's cross-process requests as deliberate raw fetches
1 parent 4cebfa2 commit 438588d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎apps/sim/scripts/test-desktop-inbox-e2e.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ async function request<S extends z.ZodType>(
9090
options: { body?: unknown; expected?: number; schema?: S } = {}
9191
): Promise<z.output<S>> {
9292
const started = Date.now()
93+
// boundary-raw-fetch: drives the running app from another process as the desktop does, with the device's session cookie, and asserts the raw status of refusals; responses are still parsed with the contract schemas.
9394
const response = await fetch(new URL(path, baseUrl), {
9495
method,
9596
headers: {
@@ -224,6 +225,7 @@ function openDoorbell(desktop: Desktop) {
224225
const controller = new AbortController()
225226
const events: string[] = []
226227
const listeners = new Set<() => void>()
228+
// boundary-raw-fetch: reads the SSE doorbell as a stream.
227229
const opened = fetch(new URL(`/api/desktop/inbox/stream?deviceId=${desktop.deviceId}`, baseUrl), {
228230
headers: { Cookie: `better-auth.session_token=${desktop.cookie}`, Accept: 'text/event-stream' },
229231
signal: controller.signal,

0 commit comments

Comments
 (0)