Skip to content

Commit

Permalink
fix: fix tests by mocking scrollIntoView function
Browse files Browse the repository at this point in the history
  • Loading branch information
steff456 committed Dec 7, 2023
1 parent 945a564 commit c07ce79
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/course-outline/CourseOutline.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ let store;
const mockPathname = '/foo-bar';
const courseId = '123';

window.HTMLElement.prototype.scrollIntoView = jest.fn();

jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useLocation: () => ({
Expand Down

0 comments on commit c07ce79

Please sign in to comment.