Skip to content

test(element-ng): disable isolation#1779

Open
spike-rabbit wants to merge 1 commit intomainfrom
test/element-ng/disable-isolation
Open

test(element-ng): disable isolation#1779
spike-rabbit wants to merge 1 commit intomainfrom
test/element-ng/disable-isolation

Conversation

@spike-rabbit
Copy link
Copy Markdown
Member

This is the default by vitest and improves performance significantly.

@spike-rabbit spike-rabbit requested review from a team as code owners March 31, 2026 08:14
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request disables global test isolation in the Vitest configuration and updates several test files to ensure proper cleanup by adding vi.restoreAllMocks() and vi.useRealTimers() in afterEach blocks. It also refactors assertions in the datatable tests to use toContainEqual with expect.objectContaining and adds manual timer advancement in focus-related tests. Feedback was provided to ensure vi.restoreAllMocks() is consistently applied in test files where mocks are used to prevent cross-test leakage.

@spike-rabbit spike-rabbit force-pushed the test/element-ng/disable-isolation branch 2 times, most recently from b1b25c9 to 5cc61e4 Compare March 31, 2026 13:54
This is the default by vitest and improves performance significantly.

A lot of those fallbacks for `vi.useRealTimers()` were introduced,
to increase general stability.
@spike-rabbit spike-rabbit force-pushed the test/element-ng/disable-isolation branch from 5cc61e4 to beb31b4 Compare March 31, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant