move-session.test.ts
1 import { describe, expect, test } from "bun:test"; 2 3 import { normalizeTargetCwd } from "../../../extensions/_shared/normalize-target-cwd"; 4 5 describe("normalizeTargetCwd", () => { 6 test("resolves relative target paths to absolute paths", () => { 7 expect(normalizeTargetCwd("../foo", {}, "/tmp/work/project")).toBe("/tmp/work/foo"); 8 }); 9 10 test("expands ~ before resolving the target path", () => { 11 expect(normalizeTargetCwd("~/code", { HOME: "/Users/tester" }, "/tmp/work/project")).toBe( 12 "/Users/tester/code", 13 ); 14 }); 15 });