Skip to content

Commit 7fda3da

Browse files
committed
Remove Element.prototype.closest() implementation
See Support for Element.closest() jsdom/jsdom#1555
1 parent 80f8586 commit 7fda3da

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

packages/react-form-with-constraints-tools/src/DisplayFields.test.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -210,19 +210,6 @@ describe('render()', () => {
210210
});
211211
});
212212

213-
// FIXME See Support for Element.closest() https://github.com/jsdom/jsdom/issues/1555
214-
if (!Element.prototype.closest) {
215-
Element.prototype.closest = function(this: Element, selector: string) {
216-
// tslint:disable-next-line:no-this-assignment
217-
let el: Element | null = this;
218-
while (el) {
219-
if (el.matches(selector)) return el;
220-
el = el.parentElement;
221-
}
222-
return null;
223-
};
224-
}
225-
226213
test('SignUp', async () => {
227214
const wrapper = mount(<SignUp />);
228215
const signUp = wrapper.instance() as SignUp;

0 commit comments

Comments
 (0)