Skip to content

Commit 545e3b3

Browse files
committed
Upgrade ava
1 parent cc8fcad commit 545e3b3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"yargs": "^7.0.2"
3131
},
3232
"devDependencies": {
33-
"ava": "^0.18.2",
33+
"ava": "^0.19.1",
3434
"coveralls": "^2.12.0",
3535
"nyc": "^10.1.2",
3636
"postcss-import": "^9.1.0",

test/error.js

Lines changed: 6 additions & 6 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, /Input Error: Must use --dir or --replace/)
15+
t.regex(err.toString(), /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, /Input Error: Must use --dir or --replace/)
23+
t.regex(err.toString(), /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, /Output Error: Cannot output external sourcemaps when writing to STDOUT/)
31+
t.regex(err.toString(), /Output Error: Cannot output external sourcemaps when writing to STDOUT/)
3232
})
3333
})
3434

@@ -42,7 +42,7 @@ test.failing('invalid --config', (t) => {
4242
)
4343
.then(({ err, code }) => {
4444
t.is(code, 1, 'expected non-zero error code')
45-
t.regex(err, /ENOENT: no such file or directory/)
45+
t.regex(err.toString(), /ENOENT: no such file or directory/)
4646
})
4747
})
4848

@@ -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, /Plugin Error: Cannot find module 'postcss-plugin'/)
59+
t.regex(err.toString(), /Plugin Error: Cannot find module 'postcss-plugin'/)
6060
})
6161
})
6262

@@ -70,6 +70,6 @@ test('CssSyntaxError', (t) => {
7070
)
7171
.then(({ err, code }) => {
7272
t.is(code, 1, 'expected non-zero error code')
73-
t.regex(err, /\[1:4] Unnecessary curly bracket/)
73+
t.regex(err.toString(), /\[1:4] Unnecessary curly bracket/)
7474
})
7575
})

0 commit comments

Comments
 (0)