Skip to content

Commit

Permalink
chore: update openai test
Browse files Browse the repository at this point in the history
  • Loading branch information
LarchLiu committed Apr 28, 2024
1 parent eb2df50 commit 36c711a
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 38 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"turbo": "^1.12.2",
"typescript": "^5.3.3",
"vite": "^5.0.12",
"vitest": "^1.2.2",
"vitest": "^1.5.2",
"vue-tsc": "^1.8.27"
},
"simple-git-hooks": {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/test/openai.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ const webInfo: WebInfoData = {
}
describe('openai', () => {
it('summarize in zh-CN', async () => {
const res = await summarizeContent(import.meta.env.VITE_OPENAI_API_KEY, webInfo, 'zh-CN', 'https://aihubmix.com')
const res = await summarizeContent(import.meta.env.VITE_OPENAI_API_KEY, webInfo, 'zh-CN', 'https://burn.hair')
expect(res.summary).toBeDefined()
expect(res.categories).toBeDefined()
// expect(res)?.toMatchSnapshot()
})
it('summarize in en', async () => {
const res = await summarizeContent(import.meta.env.VITE_OPENAI_API_KEY, webInfo, 'en', 'https://aihubmix.com')
const res = await summarizeContent(import.meta.env.VITE_OPENAI_API_KEY, webInfo, 'en', 'https://burn.hair')
expect(res.summary).toBeDefined()
expect(res.categories).toBeDefined()
// expect(res)?.toMatchSnapshot()
Expand Down
90 changes: 55 additions & 35 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 36c711a

Please sign in to comment.