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

@@ -69,12 +69,12 @@ describe('useLineClamp', () => {
const { result } = renderHook(() => useLineClamp());
// 使用 vi.spyOn 来模拟 contentRef.current
// Use vi.spyOn to simulate contentRef.current
vi.spyOn(result.current.contentRef, 'current', 'get').mockReturnValue(
mockDiv,
);
// 使用 act 包装异步操作
// Wrap asynchronous operations with act
act(() => {
window.dispatchEvent(new Event('resize'));
});
@@ -85,10 +85,10 @@ describe('useLineClamp', () => {
it('should handle null contentRef', () => {
const { result } = renderHook(() => useLineClamp());
// 使用 vi.spyOn 来模拟 contentRef.current null
// Use vi.spyOn to simulate contentRef. current is null
vi.spyOn(result.current.contentRef, 'current', 'get').mockReturnValue(null);
// 使用 act 包装异步操作
// Wrap asynchronous operations with act
act(() => {
window.dispatchEvent(new Event('resize'));
});