File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Changes to PostCSS Tape
2
2
3
+ ### 1.2.0 (December 14, 2016)
4
+
5
+ - Added: Expected ` error ` option
6
+ - Added: ` after ` command to run option
7
+
3
8
### 1.1.0 (December 8, 2016)
4
9
5
10
- Added: Support ` plugins#process ` with separate arguments
Original file line number Diff line number Diff line change @@ -97,8 +97,27 @@ Promise.all(Object.keys(tests).map(
97
97
return ` ${ pass } ${ test . message } ` ;
98
98
}
99
99
}
100
- )
100
+ ) ,
101
+ ( error ) => {
102
+ const expectedError = test . error && Object . keys ( test . error ) . every (
103
+ ( key ) => test . error [ key ] === error [ key ]
104
+ ) ;
105
+
106
+ if ( expectedError ) {
107
+ return ` ${ pass } ${ test . message } ` ;
108
+ } else {
109
+ throw error ;
110
+ }
111
+ }
101
112
)
113
+ ) . then (
114
+ ( result ) => {
115
+ if ( test . after ) {
116
+ test . after ( ) ;
117
+ }
118
+
119
+ return result ;
120
+ }
102
121
) ;
103
122
}
104
123
)
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " postcss-tape" ,
3
- "version" : " 1.1 .0" ,
3
+ "version" : " 1.2 .0" ,
4
4
"description" : " Quickly test a PostCSS Plugin" ,
5
5
"author" : " Jonathan Neal <jonathantneal@hotmail.com>" ,
6
6
"license" : " CC0-1.0" ,
You can’t perform that action at this time.
0 commit comments