Roo-Code/vitest-setup.ts
Chris Estreich 9b6ad19db0
Re-work provider settings to use react-hook-form and dynamic model data (#69)
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
2025-06-02 16:00:14 -07:00

24 lines
554 B
TypeScript

import '@testing-library/jest-dom/vitest';
import failOnConsole from 'vitest-fail-on-console';
failOnConsole({
shouldFailOnDebug: true,
shouldFailOnError: true,
shouldFailOnInfo: true,
shouldFailOnLog: true,
shouldFailOnWarn: true,
});
global.ResizeObserver = vi.fn().mockImplementation(() => ({
observe: vi.fn(),
unobserve: vi.fn(),
disconnect: vi.fn(),
}));
global.IntersectionObserver = vi.fn().mockImplementation(() => ({
observe: vi.fn(),
unobserve: vi.fn(),
disconnect: vi.fn(),
}));
beforeEach(() => vi.clearAllMocks());