Skip to content

Commit

Permalink
Merge pull request #1265 from IgniteUI/ipetrov/32491-fix-vitest-error…
Browse files Browse the repository at this point in the history
…-missing-prototype-implementations-patch-13-3

Added mock implementations of HTMLElement.prototype functions in test setup
  • Loading branch information
wnvko authored Jun 28, 2024
2 parents 2596d75 + 702ef72 commit 7e5c7b7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import '@testing-library/jest-dom'
import 'vitest-canvas-mock'
import ResizeObserver from 'resize-observer-polyfill'
import {vi} from 'vitest'

global.ResizeObserver = ResizeObserver;

HTMLElement.prototype.scrollIntoView = vi.fn();
HTMLElement.prototype.hidePopover = vi.fn();
HTMLElement.prototype.showPopover = vi.fn();
HTMLElement.prototype.togglePopover = vi.fn();

0 comments on commit 7e5c7b7

Please sign in to comment.