Skip to content

Commit b7de468

Browse files
committed
test(devices): use typed error codec assertions
1 parent 4e76ebc commit b7de468

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎apps/server/src/device/DeviceService.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -641,10 +641,10 @@ it.effect("Test connection preserves the Windows explanation across the wire", (
641641
"Connected over SSH, but this host runs Windows, and SSH device hosts currently need macOS or Linux. To use this machine's devices, run T3 Code on it and connect to that environment.",
642642
});
643643
const codec = Schema.fromJsonString(DeviceError);
644-
const decoded = yield* Schema.decodeUnknownEffect(codec)(
645-
yield* Schema.encodeEffect(codec)(error),
644+
const decoded = yield* Schema.decodeEffect(codec)(yield* Schema.encodeEffect(codec)(error));
645+
expect(decoded.message).toBe(
646+
"Windows test is unavailable: Connected over SSH, but this host runs Windows, and SSH device hosts currently need macOS or Linux. To use this machine's devices, run T3 Code on it and connect to that environment.",
646647
);
647-
expect(decoded.message).toBe(`Windows test is unavailable: ${error.reason}`);
648648
expect(decoded.message).not.toContain("private SSH diagnostics");
649649
}).pipe(
650650
Effect.provide(

0 commit comments

Comments
 (0)