File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ import "core-js/stable";
99import "regenerator-runtime/runtime" ;
1010
1111import jquery from "jquery" ;
12- window . jQuery = jquery ;
12+ global [ "$" ] = global [ "jQuery" ] = jquery ;
13+
1314jquery . expr . pseudos . visible = function ( ) {
1415 // Fix jQuery ":visible" selector always returns false in JSDOM.
1516 // https://github.com/jsdom/jsdom/issues/1048#issuecomment-401599392
@@ -26,10 +27,10 @@ document.fullscreenerror = jest.fn();
2627
2728// pat-subform
2829// See https://github.com/jsdom/jsdom/issues/1937#issuecomment-461810980
29- window . HTMLFormElement . prototype . submit = ( ) => { } ;
30+ global [ " HTMLFormElement" ] . prototype . submit = ( ) => { } ;
3031
3132// resize-observer
32- window . ResizeObserver = function ( ) {
33+ global [ " ResizeObserver" ] = function ( ) {
3334 // Just do nothing for now...
3435 return { observe : ( ) => { } } ;
3536} ;
You can’t perform that action at this time.
0 commit comments