Skip to content

test(element-ng): migrate t to vitest#1708

Draft
spike-rabbit wants to merge 1 commit intomainfrom
test/element/t-vitest
Draft

test(element-ng): migrate t to vitest#1708
spike-rabbit wants to merge 1 commit intomainfrom
test/element/t-vitest

Conversation

@spike-rabbit
Copy link
Member

@spike-rabbit spike-rabbit commented Mar 20, 2026

@spike-rabbit spike-rabbit force-pushed the test/element/t-vitest branch from e4408e5 to 6287568 Compare March 20, 2026 19:33
@gemini-code-assist
Copy link
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@spike-rabbit spike-rabbit force-pushed the test/element/t-vitest branch 2 times, most recently from 34442a3 to 5ff284c Compare March 20, 2026 20:07
@spike-rabbit spike-rabbit force-pushed the test/element/t-vitest branch from 5ff284c to bc917b8 Compare March 20, 2026 20:09
Comment on lines +241 to +248
vi.advanceTimersByTime(500);
await fixture.whenStable();
focusNext();
jasmine.clock().tick(500);
vi.advanceTimersByTime(500);
await fixture.whenStable();
expect(document.activeElement).toBe(getElement(1).nativeElement);
(document.activeElement! as HTMLElement).blur();
jasmine.clock().tick(500);
vi.advanceTimersByTime(500);
Copy link
Member

Choose a reason for hiding this comment

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

I guess the timer aren'T necessary:

Suggested change
vi.advanceTimersByTime(500);
await fixture.whenStable();
focusNext();
jasmine.clock().tick(500);
vi.advanceTimersByTime(500);
await fixture.whenStable();
expect(document.activeElement).toBe(getElement(1).nativeElement);
(document.activeElement! as HTMLElement).blur();
jasmine.clock().tick(500);
vi.advanceTimersByTime(500);
await fixture.whenStable();
focusNext();
await fixture.whenStable();
expect(document.activeElement).toBe(getElement(1).nativeElement);
(document.activeElement! as HTMLElement).blur();

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.

2 participants