Download packages/app/test-browser/prompt-scope.test.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 532 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/test-browser/prompt-scope.test.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/app/test-browser/prompt-scope.test.ts
-
curl -L -o prompt-scope.test.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/test-browser/prompt-scope.test.ts
532 Bytes
| import { expect, test } from "bun:test" | |
| import { ServerConnection } from "@/context/server" | |
| import { selectPromptTab } from "@/context/prompt" | |
| import type { Tab } from "@/context/tabs" | |
| test("selects the explicitly scoped session tab instead of the active tab", () => { | |
| const server = ServerConnection.Key.make("local") | |
| const tabs: Tab[] = [ | |
| { type: "session", server, sessionId: "A" }, | |
| { type: "session", server, sessionId: "B" }, | |
| ] | |
| expect(selectPromptTab(tabs, { dir: "repo", id: "B" }, server)).toBe(tabs[1]) | |
| }) | |