fix(windows): drain native coverage lifecycles

This commit is contained in:
Tianyi Cui
2026-08-08 23:56:00 +08:00
parent 0aefa18636
commit 3a518021f6
7 changed files with 72 additions and 8 deletions

View File

@@ -164,7 +164,11 @@ describe('QueueDock', () => {
expect(view.getByText('remove me')).toBeTruthy()
expect(view.getByText('second')).toBeTruthy()
act(() => { finishUpdate?.() })
expect(updateQueue).toHaveBeenCalledOnce()
await act(async () => {
finishUpdate?.()
await Promise.resolve()
})
await waitFor(() => {
expect(header).toHaveProperty('disabled', false)
expect(header.getAttribute('aria-expanded')).toBe('false')

View File

@@ -445,7 +445,7 @@ describe('MarkdownText', () => {
const startedAt = performance.now()
const { container } = render(<MarkdownText text={'\\(x '.repeat(6_400)} />)
expect(performance.now() - startedAt).toBeLessThan(1_000)
expect(performance.now() - startedAt).toBeLessThan(3_000)
expect(container.querySelector('.katex')).toBeNull()
})