UNPKG

@lobehub/chat

Version:

Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.

18 lines (13 loc) 443 B
import { describe, expect, it } from 'vitest'; import { chainTranslate } from '../translate'; describe('chainTranslate', () => { it('should create a payload with system and user messages for translation', () => { // Arrange const content = 'This is a test sentence.'; const targetLang = 'zh-CN'; // Act const result = chainTranslate(content, targetLang); // Assert expect(result).toMatchSnapshot(); }); });