@@ -11,21 +11,28 @@ VendorPrefix('finds simple prefixes', () => {
1111 width: -webkit-max-content;
1212 box-shadow: 0 0 0 3px -moz-mac-focusring;
1313 position: -webkit-sticky;
14+ -webkit-transition: -webkit-transform 0.3s ease-out;
15+ -moz-transition: -moz-transform 0.3s ease-out;
16+ -o-transition: -o-transform 0.3s ease-out;
1417 }
1518
16- false-positive {
19+ not-a-prefix {
1720 background: var(--test);
21+ margin: -0.3em;
1822 }
1923 `
2024 const actual = analyze ( fixture ) . values . prefixes
2125 const expected = {
22- total : 4 ,
23- totalUnique : 4 ,
26+ total : 7 ,
27+ totalUnique : 7 ,
2428 unique : {
2529 '-moz-max-content' : 1 ,
2630 '-webkit-max-content' : 1 ,
2731 '0 0 0 3px -moz-mac-focusring' : 1 ,
2832 '-webkit-sticky' : 1 ,
33+ '-webkit-transform 0.3s ease-out' : 1 ,
34+ '-moz-transform 0.3s ease-out' : 1 ,
35+ '-o-transform 0.3s ease-out' : 1 ,
2936 } ,
3037 uniquenessRatio : 1
3138 }
@@ -61,4 +68,23 @@ VendorPrefix('finds nested prefixes', () => {
6168 assert . equal ( actual , expected )
6269} )
6370
71+ VendorPrefix . skip ( 'finds DEEPLY nested prefixes' , ( ) => {
72+ const fixture = `
73+ value-vendor-prefix-deeply-nested {
74+ width: var(--test, -webkit-max-content);
75+ }
76+ `
77+ const actual = analyze ( fixture ) . values . prefixes
78+ const expected = {
79+ total : 1 ,
80+ totalUnique : 1 ,
81+ unique : {
82+ 'var(--test, -webkit-max-content)' : 1 ,
83+ } ,
84+ uniquenessRatio : 1
85+ }
86+
87+ assert . equal ( actual , expected )
88+ } )
89+
6490VendorPrefix . run ( )
0 commit comments