debian-mirror-gitlab/spec/frontend/__helpers__/dom_shims/element_scroll_to.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
177 B
JavaScript
Raw Normal View History

2020-06-23 00:09:42 +05:30
Element.prototype.scrollTo = jest.fn().mockImplementation(function scrollTo(x, y) {
this.scrollLeft = x;
this.scrollTop = y;
this.dispatchEvent(new Event('scroll'));
});