File tree 1 file changed +20
-3
lines changed
1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 859
859
assert . strictEqual ( DOMPurify ( { } ) . isSupported , false ) ;
860
860
assert . strictEqual ( DOMPurify ( { } ) . sanitize , undefined ) ;
861
861
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 ,
863
866
'string'
864
867
) ;
865
868
assert . strictEqual (
866
- DOMPurify ( { document : 'not really a document' } ) . isSupported ,
869
+ DOMPurify ( {
870
+ document : 'not really a document' ,
871
+ Element : window . Element ,
872
+ } ) . isSupported ,
867
873
false
868
874
) ;
869
875
assert . strictEqual (
870
- DOMPurify ( { document : 'not really a document' } ) . sanitize ,
876
+ DOMPurify ( {
877
+ document : 'not really a document' ,
878
+ Element : window . Element ,
879
+ } ) . sanitize ,
871
880
undefined
872
881
) ;
873
882
assert . strictEqual (
882
891
DOMPurify ( { document, Element : undefined } ) . sanitize ,
883
892
undefined
884
893
) ;
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
+ ) ;
885
902
assert . strictEqual ( typeof DOMPurify ( window ) . version , 'string' ) ;
886
903
assert . strictEqual ( typeof DOMPurify ( window ) . sanitize , 'function' ) ;
887
904
} ) ;
You can’t perform that action at this time.
0 commit comments