Skip to content

Commit

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

Added mock implementations of HTMLElement.prototype functions that ar…
  • Loading branch information
wnvko authored Jun 28, 2024
2 parents 58a0290 + d6868b7 commit d19120a
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 d19120a

Please sign in to comment.