chore: Upgrade to Vitest 4 and regroup tests for performance (#2618)

This commit is contained in:
Dermot Duffy
2026-07-26 11:28:58 -07:00
committed by GitHub
parent a0fd464d23
commit 0c3d46ad3d
36 changed files with 1041 additions and 1207 deletions
@@ -2,6 +2,7 @@ import { afterEach, describe, expect, it, vi, type Mock } from 'vitest';
import { ScreenTrigger } from '../../../../src/condition-trigger/triggers/triggers/screen';
import type { TriggerOfType } from '../../../../src/condition-trigger/triggers/triggers/types';
import { stubMatchMedia } from '../../../test-utils';
// @vitest-environment jsdom
describe('ScreenTrigger', () => {
@@ -10,7 +11,7 @@ describe('ScreenTrigger', () => {
const removeEventListener = vi.fn();
const mockMatchMedia = (): void => {
vi.spyOn(window, 'matchMedia').mockImplementation(
stubMatchMedia().mockImplementation(
() =>
({
get matches(): boolean {