fix(test): 增加页面测试超时至 15s — 覆盖率模式下避免 timeout
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

This commit is contained in:
iven
2026-05-03 23:21:58 +08:00
parent 6709df62ed
commit f4b5d55f24

View File

@@ -1,4 +1,4 @@
import { describe, it, expect } from 'vitest';
import { describe, it, expect, vi } from 'vitest';
import { screen, waitFor } from '@testing-library/react';
import { http, HttpResponse } from 'msw';
import { server } from '../mocks/server';
@@ -61,6 +61,7 @@ export function createListPageTests(config: ListPageTestConfig) {
}
it('渲染加载状态并显示数据', async () => {
vi.setConfig({ testTimeout: 15000 });
setupMock(config.mockItems);
renderWithProviders(<Component />, { route });