Fix browser error logging in test/test.js

If a browser cannot be started, we currently get the following log:
`Error while starting firefox: [object Object]`. This is simply an
oversight from the initial Puppeteer integration work since we never got
into this code path before. With this fix the error log becomes more
useful: `Error while starting firefox: connect ECONNREFUSED ::1:45387`
This commit is contained in:
Tim van der Meij 2021-11-28 18:05:20 +01:00
parent c14552874b
commit 5309133a9d
No known key found for this signature in database
GPG Key ID: 8C3FD2925A5F2762

View File

@ -975,7 +975,7 @@ function startBrowsers(initSessionCallback, makeStartUrl = null) {
}
})
.catch(function (ex) {
console.log(`Error while starting ${browserName}: ${ex}`);
console.log(`Error while starting ${browserName}: ${ex.message}`);
closeSession(browserName);
});
}