test: high coverage for all UI tests

This commit is contained in:
JobvAlewijk
2025-12-07 15:32:20 +00:00
committed by Gerla, J. (Justin)
parent c639a37dfc
commit 086caea737
18 changed files with 1641 additions and 83 deletions

View File

@@ -0,0 +1,14 @@
import { render } from '@testing-library/react';
import { act } from '@testing-library/react';
import ScrollIntoView from '../../../../../src/components/ScrollIntoView';
test('scrolls the element into view on render', () => {
const scrollMock = jest.fn();
HTMLElement.prototype.scrollIntoView = scrollMock;
act(() => {
render(<ScrollIntoView />);
});
expect(scrollMock).toHaveBeenCalledWith({ behavior: 'smooth' });
});