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

@@ -94,7 +94,7 @@ describe('AutosaveManager', () => {
manager.start();
expect(manager.observerList.length).toBe(1);
manager.start(); // 再次调用 start
manager.start(); // Call start again.
expect(manager.observerList.length).toBe(1);
});
@@ -188,7 +188,7 @@ describe('AutosaveManager', () => {
});
const observer = manager.getObserver('testKey');
// 确保所有异步操作完成
// Make sure all asynchronous operations are completed
await Promise.resolve();
expect(observer.lock).toBe(false);

View File

@@ -64,7 +64,7 @@ describe('AutosaveObserver', () => {
};
beforeEach(() => {
vi.useFakeTimers(); // 使用假定时器
vi.useFakeTimers(); // Use a hypothetical timer
observer = new AutosaveObserver({
store: mockStore,
@@ -74,7 +74,7 @@ describe('AutosaveObserver', () => {
afterEach(() => {
vi.resetAllMocks();
vi.useRealTimers(); // 恢复真实的定时器
vi.useRealTimers(); // Restore the real timer
});
it('should initialize and set initial values correctly', () => {
@@ -119,9 +119,9 @@ describe('AutosaveObserver', () => {
expect(observer.debouncedSaveFunc).toBeInstanceOf(Function);
vi.runAllTimers(); // 手动推进定时器时间以触发防抖函数
vi.runAllTimers(); // Manually advance the timer time to trigger the stabilization function
await vi.runAllTimersAsync(); // 确保所有异步操作完成
await vi.runAllTimersAsync(); // Make sure all asynchronous operations are completed
expect(saveRequest).toHaveBeenCalledWith(nextState, 'testKey', diffChange);
});