Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

claudeReplayRecordingConfig.test.ts

43 lines1.3 KB

1import { assert, it } from "@effect/vitest";
2​
3import { validateClaudeReplayRecordingSelection } from "./claudeReplayRecordingConfig.ts";
4​
5it("rejects a query mode that is incompatible with the selected scenario", () => {
6 assert.throws(
7 () =>
8 validateClaudeReplayRecordingSelection({
9 scenario: "simple",
10 configuredQueryMode: "streaming",
11 selectedQueryMode: "fork_session_siblings",
12 configuredPromptCount: 1,
13 selectedPromptCount: 1,
14 }),
15 "Select a scenario configured for the requested query mode",
16 );
17});
18​
19it("rejects prompt overrides that do not preserve the scenario shape", () => {
20 assert.throws(
21 () =>
22 validateClaudeReplayRecordingSelection({
23 scenario: "thread_fork_native_siblings",
24 configuredQueryMode: "fork_session_siblings",
25 selectedQueryMode: "fork_session_siblings",
26 configuredPromptCount: 3,
27 selectedPromptCount: 1,
28 }),
29 "requires exactly 3 prompt(s)",
30 );
31});
32​
33it("accepts the configured scenario mode and prompt shape", () => {
34 assert.doesNotThrow(() =>
35 validateClaudeReplayRecordingSelection({
36 scenario: "thread_fork_native_siblings",
37 configuredQueryMode: "fork_session_siblings",
38 selectedQueryMode: "fork_session_siblings",
39 configuredPromptCount: 3,
40 selectedPromptCount: 3,
41 }),
42 );
43});