Skip to content

Commit 64c2950

Browse files
committed
test(agent): type CLI payload fixtures
1 parent 0b5e7aa commit 64c2950

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/agents/agent-command.live-model-switch.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,10 +827,11 @@ type FallbackRunnerParams = {
827827
};
828828

829829
type ModelSwitchOptions = ConstructorParameters<typeof LiveSessionModelSwitchError>[0];
830+
type TestPayload = { text: string; isError?: boolean; isReasoning?: boolean };
830831

831832
function makeSuccessResult(provider: string, model: string) {
832833
return {
833-
payloads: [{ text: "ok" }],
834+
payloads: [{ text: "ok" }] as TestPayload[],
834835
meta: {
835836
durationMs: 100,
836837
aborted: false,
@@ -842,7 +843,7 @@ function makeSuccessResult(provider: string, model: string) {
842843

843844
function makeEmptyResult(provider: string, model: string) {
844845
return {
845-
payloads: [],
846+
payloads: [] as TestPayload[],
846847
meta: {
847848
durationMs: 30_000,
848849
aborted: false,

0 commit comments

Comments
 (0)