Skip to content

Commit abfd6eb

Browse files
committed
test: fix the test
1 parent bd131e4 commit abfd6eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/vitest/__tests__/ChatGPTClient.vitest.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ describe('ChatGPTClient with bad key', async () => {
6262
})
6363

6464
describe('ChatGPTClient streaming', () => {
65-
const cache:Record<string, any> = {}
6665

6766
it('should stream a message', async () => {
67+
const cache:Record<string, any> = {}
6868
const chunks:string[] = []
6969
const convCache = createCache(cache)
70-
const clientOptions = {onProgress: (x:string) => chunks.push(x)}
71-
const res = await sendChatMessage({message:'Generate 50 words of random text?', clientOptions, cache:convCache})
70+
const chatOptions = {onProgress: (x:string) => chunks.push(x)}
71+
const res = await sendChatMessage({message:'Generate 50 words of random text?', chatOptions, cache:convCache})
7272
const { response } = res;
7373
// Accumulated stream should match final message
7474
expect(response).toEqual(chunks.join(''))

0 commit comments

Comments
 (0)