Skip to content

Commit 9bdb0da

Browse files
jonphippsclaude
andcommitted
fix: ensure proper DOM cleanup between tests in CI environment
Add explicit React Testing Library cleanup in test setup to prevent DOM contamination between tests when running in CI mode with single thread isolation. This resolves test failures in CI where multiple VocabularyTable components would interfere with each other due to shared element IDs and insufficient cleanup. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 9eb1b04 commit 9bdb0da

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/theme/src/tests/setup.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
import '@testing-library/jest-dom';
1+
import '@testing-library/jest-dom';
2+
import { cleanup } from '@testing-library/react';
3+
import { afterEach } from 'vitest';
4+
5+
// Ensure DOM cleanup after each test
6+
afterEach(() => {
7+
cleanup();
8+
});

0 commit comments

Comments
 (0)