File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 859859 assert . strictEqual ( DOMPurify ( { } ) . isSupported , false ) ;
860860 assert . strictEqual ( DOMPurify ( { } ) . sanitize , undefined ) ;
861861 assert . strictEqual (
862- typeof DOMPurify ( { document : 'not really a document' } ) . version ,
862+ typeof DOMPurify ( {
863+ document : 'not really a document' ,
864+ Element : window . Element ,
865+ } ) . version ,
863866 'string'
864867 ) ;
865868 assert . strictEqual (
866- DOMPurify ( { document : 'not really a document' } ) . isSupported ,
869+ DOMPurify ( {
870+ document : 'not really a document' ,
871+ Element : window . Element ,
872+ } ) . isSupported ,
867873 false
868874 ) ;
869875 assert . strictEqual (
870- DOMPurify ( { document : 'not really a document' } ) . sanitize ,
876+ DOMPurify ( {
877+ document : 'not really a document' ,
878+ Element : window . Element ,
879+ } ) . sanitize ,
871880 undefined
872881 ) ;
873882 assert . strictEqual (
882891 DOMPurify ( { document, Element : undefined } ) . sanitize ,
883892 undefined
884893 ) ;
894+ assert . strictEqual (
895+ typeof DOMPurify ( { document, Element : window . Element } ) . version ,
896+ 'string'
897+ ) ;
898+ assert . strictEqual (
899+ typeof DOMPurify ( { document, Element : window . Element } ) . sanitize ,
900+ 'function'
901+ ) ;
885902 assert . strictEqual ( typeof DOMPurify ( window ) . version , 'string' ) ;
886903 assert . strictEqual ( typeof DOMPurify ( window ) . sanitize , 'function' ) ;
887904 } ) ;
You can’t perform that action at this time.
0 commit comments