Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matt200-ok committed Jul 5, 2024
1 parent fd2a680 commit 2f70397
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion binding/nodejs/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const verifyCompletion = (res: PicoLLMCompletion, expectations: CompletionExpect
).toBeLessThanOrEqual(1);
}

if (!res.completionTokens.every(x => x.token.token.includes('\\x'))) {
if (!res.completionTokens.some(x => x.token.token.includes('\\x'))) {
expect(
res.completionTokens.reduce((acc, completionToken) => acc + completionToken.token.token, '')
).toEqual(expectation.completion);
Expand Down
3 changes: 2 additions & 1 deletion resources/.test/test_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@
"!\n\n\nWhat is banana?\n- A fruit that grows on trees\n",
"uddin'\n\n\nThe song is one of the most popular songs in the modern",
" Asset, and I am going to sing it,\n\n\n\nI will sing",
" bread.\n\nThe song is a parody of the song \"Banana Bread\""
" bread.\n\nThe song is a parody of the song \"Banana Bread\"",
" bread.\n\nBanana bread is a delicious treat. It is made with bananas"
]
},
"with-top-choices": {
Expand Down

0 comments on commit 2f70397

Please sign in to comment.