test(tags): replace 1 setTimeout sleep in TagTreeNode with vi.waitFor
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -164,8 +164,7 @@ describe('TagTreeNode', () => {
|
|||||||
/einklappen|ausklappen/i.test(b.getAttribute('aria-label') ?? '')
|
/einklappen|ausklappen/i.test(b.getAttribute('aria-label') ?? '')
|
||||||
) as HTMLButtonElement;
|
) as HTMLButtonElement;
|
||||||
toggle?.click();
|
toggle?.click();
|
||||||
await new Promise((r) => setTimeout(r, 30));
|
// Map should have been mutated to opposite of current isCollapsed (false → true).
|
||||||
// Map should have been mutated to opposite of current isCollapsed (false → true)
|
await vi.waitFor(() => expect(map.get('tp1')).toBe(true));
|
||||||
expect(map.get('tp1')).toBe(true);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user