| 1 | import { EnvironmentId, ThreadId } from "@t3tools/contracts"; |
| 2 | import { describe, expect, it } from "@effect/vitest"; |
| 3 | |
| 4 | import { buildThreadActivityFileParams } from "./threadActivityFileNavigation"; |
| 5 | |
| 6 | describe("thread activity file navigation", () => { |
| 7 | it("keeps inherited activity file links on the currently selected thread", () => { |
| 8 | const sourceThreadId = ThreadId.make("source-thread"); |
| 9 | const currentThreadId = ThreadId.make("current-thread"); |
| 10 | |
| 11 | const params = buildThreadActivityFileParams({ |
| 12 | environmentId: EnvironmentId.make("environment"), |
| 13 | currentThreadId, |
| 14 | activitySourceThreadId: sourceThreadId, |
| 15 | relativePath: "apps/mobile/src/index.ts", |
| 16 | line: 12, |
| 17 | }); |
| 18 | |
| 19 | expect(params).toEqual({ |
| 20 | environmentId: "environment", |
| 21 | threadId: "current-thread", |
| 22 | path: ["apps", "mobile", "src", "index.ts"], |
| 23 | line: "12", |
| 24 | }); |
| 25 | }); |
| 26 | }); |