Skip to content

Commit 7c4921e

Browse files
greenkeeper[bot]pvdlg
authored andcommitted
chore(package): update ava to version 1.0.1
1 parent 12fa050 commit 7c4921e

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"micromatch": "^3.1.10"
2626
},
2727
"devDependencies": {
28-
"ava": "^0.25.0",
28+
"ava": "^1.0.1",
2929
"codecov": "^3.0.0",
3030
"commitizen": "^3.0.0",
3131
"conventional-changelog-atom": "^2.0.0",

test/integration.test.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -217,40 +217,38 @@ test('Use default "releaseRules" if none of provided match', async t => {
217217
});
218218

219219
test('Throw error if "preset" doesn`t exist', async t => {
220-
const error = await t.throws(analyzeCommits({preset: 'unknown-preset'}, {cwd}));
221-
222-
t.is(error.code, 'MODULE_NOT_FOUND');
220+
await t.throwsAsync(analyzeCommits({preset: 'unknown-preset'}, {cwd}), {code: 'MODULE_NOT_FOUND'});
223221
});
224222

225223
test('Throw error if "releaseRules" is not an Array or a String', async t => {
226-
await t.throws(
224+
await t.throwsAsync(
227225
analyzeCommits({releaseRules: {}}, {cwd}),
228226
/Error in commit-analyzer configuration: "releaseRules" must be an array of rules/
229227
);
230228
});
231229

232230
test('Throw error if "releaseRules" option reference a requierable module that is not an Array or a String', async t => {
233-
await t.throws(
231+
await t.throwsAsync(
234232
analyzeCommits({releaseRules: './test/fixtures/release-rules-invalid'}, {cwd}),
235233
/Error in commit-analyzer configuration: "releaseRules" must be an array of rules/
236234
);
237235
});
238236

239237
test('Throw error if "config" doesn`t exist', async t => {
240238
const commits = [{message: 'Fix: First fix (fixes #123)'}, {message: 'Update: Second feature (fixes #456)'}];
241-
const error = await t.throws(analyzeCommits({config: 'unknown-config'}, {cwd, commits, logger: t.context.logger}));
242-
243-
t.is(error.code, 'MODULE_NOT_FOUND');
239+
await t.throwsAsync(analyzeCommits({config: 'unknown-config'}, {cwd, commits, logger: t.context.logger}), {
240+
code: 'MODULE_NOT_FOUND',
241+
});
244242
});
245243

246244
test('Throw error if "releaseRules" reference invalid commit type', async t => {
247-
await t.throws(
245+
await t.throwsAsync(
248246
analyzeCommits({preset: 'eslint', releaseRules: [{tag: 'Update', release: 'invalid'}]}, {cwd}),
249247
/Error in commit-analyzer configuration: "invalid" is not a valid release type\. Valid values are:\[?.*\]/
250248
);
251249
});
252250

253251
test('Re-Throw error from "conventional-changelog-parser"', async t => {
254252
const commits = [{message: 'Fix: First fix (fixes #123)'}, {message: 'Update: Second feature (fixes #456)'}];
255-
await t.throws(analyzeCommits({parserOpts: {headerPattern: '\\'}}, {cwd, commits, logger: t.context.logger}));
253+
await t.throwsAsync(analyzeCommits({parserOpts: {headerPattern: '\\'}}, {cwd, commits, logger: t.context.logger}));
256254
});

test/load-parser-config.test.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,9 @@ test(loadPreset, 'jshint');
7575
test(loadConfig, 'jshint');
7676

7777
test('Throw error if "config" doesn`t exist', async t => {
78-
const error = await t.throws(loadParserConfig({config: 'unknown-config'}, {cwd}));
79-
80-
t.is(error.code, 'MODULE_NOT_FOUND');
78+
await t.throwsAsync(loadParserConfig({config: 'unknown-config'}, {cwd}), {code: 'MODULE_NOT_FOUND'});
8179
});
8280

8381
test('Throw error if "preset" doesn`t exist', async t => {
84-
const error = await t.throws(loadParserConfig({preset: 'unknown-preset'}, {cwd}));
85-
86-
t.is(error.code, 'MODULE_NOT_FOUND');
82+
await t.throwsAsync(loadParserConfig({preset: 'unknown-preset'}, {cwd}), {code: 'MODULE_NOT_FOUND'});
8783
});

0 commit comments

Comments
 (0)