Files
t3code/apps/server/scripts/cursorReplayRecordingWorkspace.test.ts
T
2026-08-03 11:45:12 -04:00

36 lines
1.0 KiB
TypeScript

import { assert, it } from "@effect/vitest";
import {
cursorReplayPromptsForWorkspace,
shouldSeedCursorReplayWorkspace,
} from "./cursorReplayRecordingWorkspace.ts";
it("points the read-only prompt at the unique recording workspace", () => {
assert.deepEqual(
cursorReplayPromptsForWorkspace({
scenario: "tool_call_read_only",
configuredPrompts: ["stale global path"],
packageJsonPath: "/tmp/t3-cursor-owned-abc123/package.json",
tsconfigPath: "/tmp/t3-cursor-owned-abc123/tsconfig.json",
}),
[
"Read /tmp/t3-cursor-owned-abc123/package.json and /tmp/t3-cursor-owned-abc123/tsconfig.json, then answer exactly: read only tool fixture complete",
],
);
});
it("never seeds files into an externally supplied workspace", () => {
assert.isFalse(
shouldSeedCursorReplayWorkspace({
scenario: "tool_call_read_only",
owned: false,
}),
);
assert.isTrue(
shouldSeedCursorReplayWorkspace({
scenario: "tool_call_read_only",
owned: true,
}),
);
});