File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -314,10 +314,8 @@ module.exports = postcss.plugin(
314
314
options . mode !== 'local' &&
315
315
options . mode !== 'pure'
316
316
) {
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")'
321
319
)
322
320
}
323
321
var pureMode = options . mode === 'pure'
Original file line number Diff line number Diff line change @@ -441,11 +441,11 @@ const run = (css, options) =>
441
441
tests . forEach ( testCase => {
442
442
test ( testCase . should , ( ) => {
443
443
if ( testCase . error ) {
444
- expect ( run ( testCase . input , testCase . options ) ) . rejects . toMatch (
444
+ return expect ( run ( testCase . input , testCase . options ) ) . rejects . toMatch (
445
445
RegExp ( testCase . error )
446
446
)
447
447
} else {
448
- expect ( run ( testCase . input , testCase . options ) ) . resolves . toEqual (
448
+ return expect ( run ( testCase . input , testCase . options ) ) . resolves . toEqual (
449
449
testCase . expected
450
450
)
451
451
}
You can’t perform that action at this time.
0 commit comments