fix: Include Error properties in logs

This commit is contained in:
Pierre Vanduynslager
2017-10-29 14:37:05 -07:00
committed by Gregor Martynus
parent ad2e1d76b7
commit c90765e10d
5 changed files with 35 additions and 13 deletions
+4
View File
@@ -634,8 +634,12 @@ test.serial('Log unexpected errors from plugins and exit with 1', async t => {
await gitCommits(['feat: Initial commit']);
t.log('$ semantic-release');
let {stderr, code} = await execa(cli, [], {env, reject: false});
// Verify the type and message are logged
t.regex(stderr, /Error: a/);
// Verify the the stacktrace is logged
t.regex(stderr, new RegExp(pluginError));
// Verify the Error properties are logged
t.regex(stderr, /errorProperty: 'errorProperty'/);
t.is(code, 1);
});