fix: Include Error properties in logs
This commit is contained in:
committed by
Gregor Martynus
parent
ad2e1d76b7
commit
c90765e10d
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user