File tree Expand file tree Collapse file tree 1 file changed +16
-18
lines changed
packages/css-parser-algorithms/test/cases/component-value Expand file tree Collapse file tree 1 file changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -22,27 +22,25 @@ test('component-value', (t) => {
2222 } ,
2323 ] ;
2424
25- cases . forEach ( ( testCase , index ) => {
26- t . test ( index , ( ) => {
27- let didError = false ;
25+ cases . forEach ( ( testCase ) => {
26+ let didError = false ;
2827
29- const result = parseComponentValue ( testCase . tokens , {
30- onParseError : ( err ) => {
31- didError = true ;
28+ const result = parseComponentValue ( testCase . tokens , {
29+ onParseError : ( err ) => {
30+ didError = true ;
3231
33- if ( testCase . expectSuccess ) {
34- throw err ;
35- }
36- } ,
37- } ) ;
32+ if ( testCase . expectSuccess ) {
33+ throw err ;
34+ }
35+ } ,
36+ } ) ;
3837
39- if ( testCase . expectSuccess && ! result ) {
40- throw new Error ( 'Expected test to pass and have a result' ) ;
41- }
38+ if ( testCase . expectSuccess && ! result ) {
39+ throw new Error ( 'Expected test to pass and have a result' ) ;
40+ }
4241
43- if ( ! testCase . expectSuccess && ! didError ) {
44- throw new Error ( 'Expected test to fail' ) ;
45- }
46- } ) ;
42+ if ( ! testCase . expectSuccess && ! didError ) {
43+ throw new Error ( 'Expected test to fail' ) ;
44+ }
4745 } ) ;
4846} ) ;
You can’t perform that action at this time.
0 commit comments