@@ -2,7 +2,8 @@ import test from 'ava';
22import postcss from 'postcss' ;
33import plugin from '../src' ;
44
5- const processing = ( inputCSS , options ) => postcss ( [ plugin ( options ) ] ) . process ( inputCSS ) . css ;
5+ const processing = ( inputCSS , options ) =>
6+ postcss ( [ plugin ( options ) ] ) . process ( inputCSS ) . css ;
67
78test ( 'processing not options and not attribute selector' , t => {
89 const expected = '.class, .test { color:red; }' ;
@@ -17,8 +18,10 @@ test('processing options prefix and not attribute selector', t => {
1718} ) ;
1819
1920test ( 'processing options prefix multiple' , t => {
20- const expected = '.class, [type="test-text"], [class*="test-lorem-1 test-lorem-2"], [id^="test-myID"] { color:red; }' ;
21- const fixtures = '.class, [type="text"], [class*="lorem-1 lorem-2"], [id^="myID"] { color:red; }' ;
21+ const expected =
22+ '.class, [type="test-text"], [class*="test-lorem-1 test-lorem-2"], [id^="test-myID"] { color:red; }' ;
23+ const fixtures =
24+ '.class, [type="text"], [class*="lorem-1 lorem-2"], [id^="myID"] { color:red; }' ;
2225 t . is ( processing ( fixtures , { prefix : 'test-' } ) , expected ) ;
2326} ) ;
2427
@@ -29,46 +32,63 @@ test('processing options prefix and attribute selector', t => {
2932} ) ;
3033
3134test ( 'processing options prefix, filter and attribute selector' , t => {
32- const expected = '.class, [type="text"], [class*="test-lorem"] { color:red; }' ;
35+ const expected =
36+ '.class, [type="text"], [class*="test-lorem"] { color:red; }' ;
3337 const fixtures = '.class, [type="text"], [class*="lorem"] { color:red; }' ;
34- t . is ( processing ( fixtures , {
35- prefix : 'test-' ,
36- filter : [ 'class' ]
37- } ) , expected ) ;
38+ t . is (
39+ processing ( fixtures , {
40+ prefix : 'test-' ,
41+ filter : [ 'class' ]
42+ } ) ,
43+ expected
44+ ) ;
3845} ) ;
3946
4047test ( 'processing options prefix, filter and attribute selector witch indentical class filter' , t => {
4148 const expected = '.class, [type="text"], [alt*="class"] { color:red; }' ;
4249 const fixtures = '.class, [type="text"], [alt*="class"] { color:red; }' ;
43- t . is ( processing ( fixtures , {
44- prefix : 'test-' ,
45- filter : [ 'class' ]
46- } ) , expected ) ;
50+ t . is (
51+ processing ( fixtures , {
52+ prefix : 'test-' ,
53+ filter : [ 'class' ]
54+ } ) ,
55+ expected
56+ ) ;
4757} ) ;
4858
4959test ( 'processing options filter and attribute selector' , t => {
5060 const expected = '.class, [type="text"], [class*="lorem"] { color:red; }' ;
5161 const fixtures = '.class, [type="text"], [class*="lorem"] { color:red; }' ;
52- t . is ( processing ( fixtures , {
53- filter : [ 'class' ]
54- } ) , expected ) ;
62+ t . is (
63+ processing ( fixtures , {
64+ filter : [ 'class' ]
65+ } ) ,
66+ expected
67+ ) ;
5568} ) ;
5669
5770test ( 'processing options prefix, filter, ignore and attribute selector' , t => {
5871 const expected = '.class, [type="text"], [class*="lorem"] { color:red; }' ;
5972 const fixtures = '.class, [type="text"], [class*="lorem"] { color:red; }' ;
60- t . is ( processing ( fixtures , {
61- prefix : 'test' ,
62- filter : [ 'class' ] ,
63- ignore : [ 'class' ]
64- } ) , expected ) ;
73+ t . is (
74+ processing ( fixtures , {
75+ prefix : 'test' ,
76+ filter : [ 'class' ] ,
77+ ignore : [ 'class' ]
78+ } ) ,
79+ expected
80+ ) ;
6581} ) ;
6682
6783test ( 'processing options prefix, ignore and attribute selector' , t => {
68- const expected = '.class, [type="text"], [class*="test-lorem"] { color:red; }' ;
84+ const expected =
85+ '.class, [type="text"], [class*="test-lorem"] { color:red; }' ;
6986 const fixtures = '.class, [type="text"], [class*="lorem"] { color:red; }' ;
70- t . is ( processing ( fixtures , {
71- prefix : 'test-' ,
72- ignore : [ 'type' ]
73- } ) , expected ) ;
87+ t . is (
88+ processing ( fixtures , {
89+ prefix : 'test-' ,
90+ ignore : [ 'type' ]
91+ } ) ,
92+ expected
93+ ) ;
7494} ) ;
0 commit comments