UNPKG

@testing-library/user-event

Version:
15 lines (12 loc) 320 B
'use strict'; function isDescendantOrSelf(potentialDescendant, potentialAncestor) { let el = potentialDescendant; do { if (el === potentialAncestor) { return true; } el = el.parentElement; }while (el) return false; } exports.isDescendantOrSelf = isDescendantOrSelf;