@@ -4,24 +4,24 @@ import tmp from './helpers/tmp.js'
44import cli from './helpers/cli.js'
55
66test ( 'multiple input files && --output' , t => {
7- return cli ( [ 'test/fixtures/*.css' , '-o' , tmp ( ) ] ) . then ( ( { err , code } ) => {
7+ return cli ( [ 'test/fixtures/*.css' , '-o' , tmp ( ) ] ) . then ( ( { error , code } ) => {
88 t . is ( code , 1 , 'expected non-zero error code' )
9- t . regex ( err . toString ( ) , / I n p u t E r r o r : M u s t u s e - - d i r o r - - r e p l a c e / )
9+ t . regex ( error . toString ( ) , / I n p u t E r r o r : M u s t u s e - - d i r o r - - r e p l a c e / )
1010 } )
1111} )
1212
1313test ( 'multiple input files && writing to stdout' , t => {
14- return cli ( [ 'test/fixtures/*.css' ] ) . then ( ( { err , code } ) => {
14+ return cli ( [ 'test/fixtures/*.css' ] ) . then ( ( { error , code } ) => {
1515 t . is ( code , 1 , 'expected non-zero error code' )
16- t . regex ( err . toString ( ) , / I n p u t E r r o r : M u s t u s e - - d i r o r - - r e p l a c e / )
16+ t . regex ( error . toString ( ) , / I n p u t E r r o r : M u s t u s e - - d i r o r - - r e p l a c e / )
1717 } )
1818} )
1919
2020test ( '--map && writing to stdout' , t => {
21- return cli ( [ 'test/fixtures/a.css' , '--map' ] ) . then ( ( { err , code } ) => {
21+ return cli ( [ 'test/fixtures/a.css' , '--map' ] ) . then ( ( { error , code } ) => {
2222 t . is ( code , 1 , 'expected non-zero error code' )
2323 t . regex (
24- err . toString ( ) ,
24+ error . toString ( ) ,
2525 / O u t p u t E r r o r : C a n n o t o u t p u t e x t e r n a l s o u r c e m a p s w h e n w r i t i n g t o S T D O U T /
2626 )
2727 } )
@@ -34,18 +34,18 @@ test.failing('invalid --config', t => {
3434 'test/postcss.config.js' ,
3535 '-d' ,
3636 tmp ( )
37- ] ) . then ( ( { err , code } ) => {
37+ ] ) . then ( ( { error , code } ) => {
3838 t . is ( code , 1 , 'expected non-zero error code' )
39- t . regex ( err . toString ( ) , / E N O E N T : n o s u c h f i l e o r d i r e c t o r y / )
39+ t . regex ( error . toString ( ) , / E N O E N T : n o s u c h f i l e o r d i r e c t o r y / )
4040 } )
4141} )
4242
4343test ( 'plugin not found' , t => {
4444 return cli ( [ 'test/fixtures/a.css' , '-u' , 'postcss-plugin' , '-o' , tmp ( ) ] ) . then (
45- ( { err , code } ) => {
45+ ( { error , code } ) => {
4646 t . is ( code , 1 , 'expected non-zero error code' )
4747 t . regex (
48- err . toString ( ) ,
48+ error . toString ( ) ,
4949 / P l u g i n E r r o r : C a n n o t f i n d m o d u l e ' p o s t c s s - p l u g i n ' /
5050 )
5151 }
@@ -59,18 +59,18 @@ test('plugin throws on require', t => {
5959 './test/fixtures/bad-plugin' ,
6060 '-o' ,
6161 tmp ( )
62- ] ) . then ( ( { err , code } ) => {
62+ ] ) . then ( ( { error , code } ) => {
6363 t . is ( code , 1 , 'expected non-zero error code' )
64- t . regex ( err . toString ( ) , / P l u g i n E r r o r \( .* b a d - p l u g i n \) : T h i s f a i l s / )
64+ t . regex ( error . toString ( ) , / P l u g i n E r r o r \( .* b a d - p l u g i n \) : T h i s f a i l s / )
6565 } )
6666} )
6767
6868test ( 'CssSyntaxError' , t => {
6969 return cli ( [ 'test/fixtures/a.css' , '--parser' , 'sugarss' , '-o' , tmp ( ) ] ) . then (
70- ( { err , code } ) => {
70+ ( { error , code } ) => {
7171 t . is ( code , 1 , 'expected non-zero error code' )
7272 t . regex (
73- err . toString ( ) ,
73+ error . toString ( ) ,
7474 / C s s S y n t a x E r r o r : .* a .c s s : 1 : 4 : U n n e c e s s a r y c u r l y b r a c k e t /
7575 )
7676 }
0 commit comments