[jquery] add root alias to $(..).findTestSubject

This commit is contained in:
spalger 2015-09-23 10:07:33 -07:00
parent 79968f9e31
commit 657697aa68

View file

@ -1,6 +1,6 @@
module.exports = function bindToJquery($) {
$.fn.findTestSubject = function (/* ...subjectSelectors */) {
function findTestSubject(/* ...subjectSelectors */) {
var subjectSelectors = [].slice.apply(arguments);
var $els = $();
var $context = this;
@ -16,4 +16,9 @@ module.exports = function bindToJquery($) {
return $els;
};
$.fn.findTestSubject = findTestSubject;
$.findTestSubject = function () {
return findTestSubject.apply($(document.body), arguments);
};
};