File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 3737 }
3838}` ;
3939
40+ export const cssWithoutWildcard : string = `
41+ .box {
42+ width: 100px;
43+ height: 100px;
44+ }
45+ ` ;
46+
4047export const cssString = `:root {
4148 --building-color1: #aa80ff;
4249 --building-color2: #66cc99;
@@ -47,7 +54,7 @@ export const cssString = `:root {
4754 --window-color3: #d98cb3;
4855 --window-color4: #8cb3d9;
4956}
50-
57+
5158* {
5259 box-sizing: border-box;
5360}
Original file line number Diff line number Diff line change 11// @vitest -environment jsdom
2- import { cssString } from "./__fixtures__/curriculum-helper-css" ;
2+ import {
3+ cssString ,
4+ cssWithoutWildcard ,
5+ } from "./__fixtures__/curriculum-helper-css" ;
36import { CSSHelp } from "./../helpers/lib/index" ;
47
8+ describe ( "getStyle with no wildcard in css" , ( ) => {
9+ it ( "should return null when wildcard selector is not present in css" , ( ) => {
10+ const style = document . createElement ( "style" ) ;
11+ style . textContent = String ( cssWithoutWildcard ) ;
12+ document . head . appendChild ( style ) ;
13+
14+ const helper = new CSSHelp ( document ) ;
15+
16+ expect ( helper . getStyle ( "*" ) ) . toBeNull ( ) ;
17+ } ) ;
18+ } ) ;
19+
520describe ( "css-help" , ( ) => {
621 const doc = document ;
722 let t : CSSHelp ;
You can’t perform that action at this time.
0 commit comments