Download packages/app/e2e/performance/unit/chrome-trace-write.test.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 581 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/e2e/performance/unit/chrome-trace-write.test.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/app/e2e/performance/unit/chrome-trace-write.test.ts
-
curl -L -o chrome-trace-write.test.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/e2e/performance/unit/chrome-trace-write.test.ts
581 Bytes
| import { expect, test } from "bun:test" | |
| import { mkdtemp, rm } from "node:fs/promises" | |
| import path from "node:path" | |
| import os from "node:os" | |
| import { prepareChromeTrace } from "../chrome-trace" | |
| test("creates the configured trace directory", async () => { | |
| const root = await mkdtemp(path.join(os.tmpdir(), "opencode-trace-")) | |
| try { | |
| const file = await prepareChromeTrace(path.join(root, "nested", "traces"), "session/tab", false, "test") | |
| expect(file).toEndWith("-session-tab-458ed9e3-test.json") | |
| } finally { | |
| await rm(root, { recursive: true, force: true }) | |
| } | |
| }) | |