@@ -2,24 +2,23 @@ import { applyImportantSelector } from '../../src/util/applyImportantSelector'
2
2
3
3
it . each `
4
4
before | after
5
- ${ '.foo' } | ${ '#app :is( .foo) ' }
5
+ ${ '.foo' } | ${ '#app .foo' }
6
6
${ '.foo .bar' } | ${ '#app :is(.foo .bar)' }
7
- ${ '.foo:hover' } | ${ '#app :is( .foo:hover) ' }
7
+ ${ '.foo:hover' } | ${ '#app .foo:hover' }
8
8
${ '.foo .bar:hover' } | ${ '#app :is(.foo .bar:hover)' }
9
- ${ '.foo::before' } | ${ '#app :is(.foo)::before' }
10
- ${ '.foo::before' } | ${ '#app :is(.foo)::before' }
11
- ${ '.foo::file-selector-button' } | ${ '#app :is(.foo)::file-selector-button' }
12
- ${ '.foo::-webkit-progress-bar' } | ${ '#app :is(.foo)::-webkit-progress-bar' }
13
- ${ '.foo:hover::before' } | ${ '#app :is(.foo:hover)::before' }
9
+ ${ '.foo::before' } | ${ '#app .foo::before' }
10
+ ${ '.foo::file-selector-button' } | ${ '#app .foo::file-selector-button' }
11
+ ${ '.foo::-webkit-progress-bar' } | ${ '#app .foo::-webkit-progress-bar' }
12
+ ${ '.foo:hover::before' } | ${ '#app .foo:hover::before' }
14
13
${ ':is(:where(.dark) :is(:where([dir="rtl"]) .foo::before))' } | ${ '#app :is(:where(.dark) :is(:where([dir="rtl"]) .foo))::before' }
15
14
${ ':is(:where(.dark) .foo) .bar' } | ${ '#app :is(:is(:where(.dark) .foo) .bar)' }
16
15
${ ':is(.foo) :is(.bar)' } | ${ '#app :is(:is(.foo) :is(.bar))' }
17
16
${ ':is(.foo)::before' } | ${ '#app :is(.foo)::before' }
18
- ${ '.foo:before' } | ${ '#app :is( .foo) :before' }
19
- ${ '.foo::some-uknown-pseudo' } | ${ '#app :is( .foo) ::some-uknown-pseudo' }
20
- ${ '.foo::some-uknown-pseudo:hover' } | ${ '#app :is( .foo) ::some-uknown-pseudo:hover' }
21
- ${ '.foo:focus::some-uknown-pseudo:hover' } | ${ '#app :is( .foo:focus) ::some-uknown-pseudo:hover' }
22
- ${ '.foo:hover::some-uknown-pseudo:focus' } | ${ '#app :is( .foo:hover) ::some-uknown-pseudo:focus' }
17
+ ${ '.foo:before' } | ${ '#app .foo:before' }
18
+ ${ '.foo::some-uknown-pseudo' } | ${ '#app .foo::some-uknown-pseudo' }
19
+ ${ '.foo::some-uknown-pseudo:hover' } | ${ '#app .foo::some-uknown-pseudo:hover' }
20
+ ${ '.foo:focus::some-uknown-pseudo:hover' } | ${ '#app .foo:focus::some-uknown-pseudo:hover' }
21
+ ${ '.foo:hover::some-uknown-pseudo:focus' } | ${ '#app .foo:hover::some-uknown-pseudo:focus' }
23
22
` ( 'should generate "$after" from "$before"' , ( { before, after } ) => {
24
23
expect ( applyImportantSelector ( before , '#app' ) ) . toEqual ( after )
25
24
} )
0 commit comments