Files
bilin/tests/main/ai-client.test.ts
T
bing 8ce35a1e8e feat: ship v0.3.0 with P2.1 editor polish and P3 AI collaboration
Add chapter reorder, search replace, inspiration capture, and AI chat with context editing, settings, offline handling, and naming checks. Fix dev black screen by keeping process.env reads in the main process only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 16:33:56 +08:00

13 lines
520 B
TypeScript

import { describe, it, expect } from 'vitest'
import { AiClientService } from '../../src/main/services/ai-client.service'
import { DEFAULT_AI_CONFIG } from '../../src/shared/types'
describe('AiClientService', () => {
const client = new AiClientService(() => DEFAULT_AI_CONFIG)
it('IT-AI-01: chat returns non-empty content from LM Studio', async () => {
const content = await client.chat([{ role: 'user', content: '回复一个字:好' }])
expect(content.trim().length).toBeGreaterThan(0)
}, 90_000)
})