mirror of
https://github.com/anomalyco/opencode.git
synced 2026-09-05 11:14:31 +00:00
14 lines
550 B
TypeScript
14 lines
550 B
TypeScript
import { expect, test } from "bun:test"
|
|
import { ServerConnection } from "@/runtime/server/registry"
|
|
import { selectPromptTab } from "@/composer/persistence"
|
|
import type { Tab } from "@/shell/tabs/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])
|
|
})
|