File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -314,10 +314,8 @@ module.exports = postcss.plugin(
314314 options . mode !== 'local' &&
315315 options . mode !== 'pure'
316316 ) {
317- return result . error (
318- Error (
319- 'options.mode must be either "global", "local" or "pure" (default "local")'
320- )
317+ throw Error (
318+ 'options.mode must be either "global", "local" or "pure" (default "local")'
321319 )
322320 }
323321 var pureMode = options . mode === 'pure'
Original file line number Diff line number Diff line change @@ -441,11 +441,11 @@ const run = (css, options) =>
441441tests . forEach ( testCase => {
442442 test ( testCase . should , ( ) => {
443443 if ( testCase . error ) {
444- expect ( run ( testCase . input , testCase . options ) ) . rejects . toMatch (
444+ return expect ( run ( testCase . input , testCase . options ) ) . rejects . toMatch (
445445 RegExp ( testCase . error )
446446 )
447447 } else {
448- expect ( run ( testCase . input , testCase . options ) ) . resolves . toEqual (
448+ return expect ( run ( testCase . input , testCase . options ) ) . resolves . toEqual (
449449 testCase . expected
450450 )
451451 }
You can’t perform that action at this time.
0 commit comments