test: Verify Error instance type and SemanticReleaseError name

This commit is contained in:
Pierre Vanduynslager
2017-11-29 18:06:14 -05:00
parent 2491032a99
commit 8371a03da0
6 changed files with 18 additions and 16 deletions
+5 -2
View File
@@ -49,7 +49,7 @@ test('Use default when only options are passed for a single plugin', t => {
});
test('Throw an error if plugin configuration is missing a path for plugin pipeline', t => {
const error = t.throws(() => getPlugins({verifyConditions: {}}, t.context.logger));
const error = t.throws(() => getPlugins({verifyConditions: {}}, t.context.logger), Error);
t.is(
error.message,
@@ -58,7 +58,10 @@ test('Throw an error if plugin configuration is missing a path for plugin pipeli
});
test('Throw an error if an array of plugin configuration is missing a path for plugin pipeline', t => {
const error = t.throws(() => getPlugins({verifyConditions: [{path: '@semantic-release/npm'}, {}]}, t.context.logger));
const error = t.throws(
() => getPlugins({verifyConditions: [{path: '@semantic-release/npm'}, {}]}, t.context.logger),
Error
);
t.is(
error.message,