Skip to content

Commit 7e8ccf4

Browse files
committed
feat(Tests): Add $(":visible") pseudo selector for jQuery.
1 parent 37520b7 commit 7e8ccf4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/setup-tests.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
import jquery from "jquery";
44
global.$ = global.jQuery = jquery;
55

6+
jquery.expr.pseudos.visible = function () {
7+
// Fix jQuery ":visible" selector always returns false in JSDOM.
8+
// https://github.com/jsdom/jsdom/issues/1048#issuecomment-401599392
9+
return true;
10+
};
11+
612
// Do not output error messages
713
import logging from "./core/logging";
814
logging.setLevel(50);

0 commit comments

Comments
 (0)