Skip to content

Commit eddcb06

Browse files
test(error): better error handling (process.stdout)
1 parent 2c79338 commit eddcb06

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/error.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ test('multiple input files && --output', (t) => {
1212
)
1313
.then(({ err, code }) => {
1414
t.is(code, 1, 'expected non-zero error code')
15-
t.regex(err, /Must use --dir or --replace/)
15+
t.regex(err, /Input Error: Must use --dir or --replace/)
1616
})
1717
})
1818

1919
test('multiple input files && writing to stdout', (t) => {
2020
return cli(['test/fixtures/*.css'])
2121
.then(({ err, code }) => {
2222
t.is(code, 1, 'expected non-zero error code')
23-
t.regex(err, /Must use --dir or --replace/)
23+
t.regex(err, /Input Error: Must use --dir or --replace/)
2424
})
2525
})
2626

2727
test('--map && writing to stdout', (t) => {
2828
return cli(['test/fixtures/a.css', '--map'])
2929
.then(({ err, code }) => {
3030
t.is(code, 1, 'expected non-zero error code')
31-
t.regex(err, /Cannot output external sourcemaps when writing to stdout/)
31+
t.regex(err, /Output Error: Cannot output external sourcemaps when writing to STDOUT/)
3232
})
3333
})
3434

@@ -56,7 +56,7 @@ test('PluginError', (t) => {
5656
)
5757
.then(({ err, code }) => {
5858
t.is(code, 1, 'expected non-zero error code')
59-
t.regex(err, /PluginError: Cannot find module 'postcss-plugin'/)
59+
t.regex(err, /Plugin Error: Cannot find module 'postcss-plugin'/)
6060
})
6161
})
6262

0 commit comments

Comments
 (0)