chore: replace all cn comments of fe to en version by volc api (#320)

This commit is contained in:
tecvan
2025-07-31 10:32:15 +08:00
committed by GitHub
parent 716ec0cba8
commit 71f6245a01
2960 changed files with 15545 additions and 15545 deletions

View File

@@ -21,7 +21,7 @@ import {
defaultConversationUniqId,
} from '../../src/const/community';
// 模拟 lodash-es 的 uniqueId 函数
// Mimicking the uniqueId function of lodash-es
vi.mock('lodash-es', () => ({
uniqueId: vi.fn().mockReturnValue('mocked-unique-id'),
}));
@@ -32,9 +32,9 @@ describe('const/community', () => {
});
test('defaultConversationUniqId should be a unique ID generated by lodash-es', () => {
// 验证 uniqueId 函数被调用
// Verify that the uniqueId function is called
expect(uniqueId).toHaveBeenCalled();
// 验证 defaultConversationUniqId 的值是由模拟的 uniqueId 函数返回的
// Verify that defaultConversationUniqId value is returned by the simulated uniqueId function
expect(defaultConversationUniqId).toBe('mocked-unique-id');
});
});

View File

@@ -34,8 +34,8 @@ describe('const/custom', () => {
expect(COZE_TOKEN_INSUFFICIENT_ERROR_CODE).toContain('702095072');
});
// 移除失败的测试用例
// 原因:在 JavaScript 中,即使使用 const 声明数组,其内容仍然是可变的
// 只有数组引用是不可变的,而不是数组内容
// Remove failed test cases
// Reason: In JavaScript, even if an array is declared with const, its content is still mutable
// Only the array reference is immutable, not the array content
});
});

View File

@@ -19,10 +19,10 @@ import { globalVars } from '../src/global-var';
describe('global-var', () => {
test('should be able to set and get a property', () => {
const testValue = 'Hello, World';
// 设置一个属性
// Set a property
globalVars.TEST_PROP = testValue;
// 确保我们能获取到相同的属性
// Make sure we can get the same properties
expect(globalVars.TEST_PROP).toBe(testValue);
});
@@ -34,11 +34,11 @@ describe('global-var', () => {
const firstValue = 'First Value';
const secondValue = 'Second Value';
// 先设置一个属性
// Set a property first
globalVars.OVERWRITE_PROP = firstValue;
expect(globalVars.OVERWRITE_PROP).toBe(firstValue);
// 再覆盖这个属性
// Override this property again
globalVars.OVERWRITE_PROP = secondValue;
expect(globalVars.OVERWRITE_PROP).toBe(secondValue);
});