src: Move .scrollTo mock implementation to setup.ts

This moves the `.scrollTo` mock implementation to a setup file for other test files to use.
This commit is contained in:
regexowl 2024-07-08 11:12:35 +02:00 committed by Ondřej Ezr
parent 8597929ff3
commit e036f9b892
4 changed files with 3 additions and 10 deletions

View file

@ -16,8 +16,6 @@ vi.mock('@redhat-cloud-services/frontend-components/useChrome', () => ({
}),
}));
window.HTMLElement.prototype.scrollTo = function () {};
vi.mock('@unleash/proxy-client-react', () => ({
useUnleashContext: () => vi.fn(),
useFlag: vi.fn((flag) => {