Skip to content

Commit 8c86ab7

Browse files
committed
chore: updated finishReason related fixtures in chat.test
1 parent bfc5b40 commit 8c86ab7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/ai/src/ui/chat.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ describe('Chat', () => {
903903
}),
904904
formatChunk({ type: 'text-end', id: 'text-1' }),
905905
formatChunk({ type: 'finish-step' }),
906-
formatChunk({ type: 'finish' }),
906+
formatChunk({ type: 'finish', finishReason: 'stop' }),
907907
],
908908
};
909909

@@ -1556,7 +1556,7 @@ describe('Chat', () => {
15561556

15571557
// finish stream
15581558
controller1.write(formatChunk({ type: 'finish-step' }));
1559-
controller1.write(formatChunk({ type: 'finish' }));
1559+
controller1.write(formatChunk({ type: 'finish', finishReason: 'stop' }));
15601560

15611561
await controller1.close();
15621562

@@ -1923,7 +1923,7 @@ describe('Chat', () => {
19231923
}),
19241924
formatChunk({ type: 'text-end', id: 'id-1' }),
19251925
formatChunk({ type: 'finish-step' }),
1926-
formatChunk({ type: 'finish' }),
1926+
formatChunk({ type: 'finish', finishReason: 'stop' }),
19271927
],
19281928
},
19291929
];
@@ -2426,7 +2426,7 @@ describe('Chat', () => {
24262426
}),
24272427
formatChunk({ type: 'text-end', id: 'txt-1' }),
24282428
formatChunk({ type: 'finish-step' }),
2429-
formatChunk({ type: 'finish' }),
2429+
formatChunk({ type: 'finish', finishReason: 'stop' }),
24302430
],
24312431
},
24322432
];

0 commit comments

Comments
 (0)