Buckets:
| import { describe, expect } from "bun:test" | |
| import { Effect } from "effect" | |
| import { handlePtyInput } from "@opencode-ai/core/pty/input" | |
| import { it } from "../lib/effect" | |
| describe("pty websocket input", () => { | |
| it.effect("does not forward invalid binary frames to the PTY handler", () => | |
| Effect.gen(function* () { | |
| const messages: Array<string | ArrayBuffer> = [] | |
| const handler = { onMessage: (message: string | ArrayBuffer) => messages.push(message) } | |
| yield* handlePtyInput(handler, "ready") | |
| yield* handlePtyInput(handler, new Uint8Array([0xff, 0xfe, 0xfd])) | |
| yield* handlePtyInput(handler, new TextEncoder().encode("hello")) | |
| expect(messages).toEqual(["ready", "hello"]) | |
| }), | |
| ) | |
| }) | |
Xet Storage Details
- Size:
- 731 Bytes
- Xet hash:
- 54e94fc076ac4f9f8f185f4d65f5fd39cfe9e7c716700c2e03491f2bc5a32ddd
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.