Sitelet https://github.com/NodeOps-app/createos-sandbox-sdk/commit/8f0863f2cf2b4dba22ed1e3fb84aff1dde9f039e
Skip to content

Commit 8f0863f

Browse files
authored
test(sandbox): cover managed process and computer-use APIs (#52)
src/sandbox.ts had drifted to 59.35% functions / 55.73% lines against the per-file 0.9 floor in bunfig.toml, so `bun test` exited 1 and took `prepublishOnly` — and therefore every publish — down with it. The file grew two whole sub-APIs (managed processes, computer-use) without tests. - tests/sandbox-processes.test.ts: 12-case wire-contract table over SandboxProcesses, plus stdin base64 encoding (UTF-8 and raw bytes), the btoa/atob fallback, and connect()'s NDJSON event union. - tests/sandbox-computer.test.ts: 43-case table across mouse, keyboard, windows, screens and desktop; screenshot raw bytes, region query, and the 404 error path. - tests/sandbox.test.ts: the ip/name getters. Each case asserts method, pathname, query, request body and the unwrapped result — not just line coverage. src/sandbox.ts is now 100/100; the floor in bunfig.toml is unchanged.
1 parent d314db2 commit 8f0863f

3 files changed

Lines changed: 840 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)