File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,11 @@ describe("css-help", () => {
2121 } ) ;
2222 } ) ;
2323 describe ( "getStyle" , ( ) => {
24- it ( "should return null for wildcard selector" , ( ) => {
25- expect ( t . getStyle ( "*" ) ) . toBeNull ( ) ;
24+ it ( "should return a style for wildcard selector when explicitly requested" , ( ) => {
25+ expect ( t . getStyle ( "*" ) ) . toBeTruthy ( ) ;
26+ } ) ;
27+ it ( "should not implicitly match wildcard selector for non-wildcard selector" , ( ) => {
28+ expect ( t . getStyle ( ".does-not-exist" ) ) . toBeNull ( ) ;
2629 } ) ;
2730 it ( "should return a non-empty ExtendedCSSStyleDeclaration object" , ( ) => {
2831 expect ( t . getStyle ( ".bb1" ) ) . toBeTruthy ( ) ;
@@ -37,11 +40,9 @@ describe("css-help", () => {
3740 it ( "should return an ExtendedCSSStyleDeclaration object of length 1" , ( ) => {
3841 expect ( t . getStyleAny ( [ ".earth" , ".sky" ] ) ?. length ) . toEqual ( 1 ) ;
3942 } ) ;
40-
4143 it ( "should allow wildcard selector explicitly" , ( ) => {
4244 expect ( t . getStyleAny ( [ "*" ] ) ?. length ) . toEqual ( 1 ) ;
4345 } ) ;
44-
4546 it ( "should return null when no selectors match" , ( ) => {
4647 expect ( t . getStyleAny ( [ ".sun" , ".earth" , ".moon" ] ) ) . toBeNull ( ) ;
4748 } ) ;
You can’t perform that action at this time.
0 commit comments