Add logs to smoke tests (#13533)

* add logs

* fix log option

* update log folder
This commit is contained in:
Lucy Zhang
2020-11-25 06:58:43 -08:00
committed by GitHub
parent d060f1b9a0
commit 1554e51932
2 changed files with 6 additions and 1 deletions

View File

@@ -75,6 +75,11 @@ if (screenshotsPath) {
mkdirp.sync(screenshotsPath);
}
const logPath = opts.log ? path.resolve(opts.log) : null;
if (logPath) {
mkdirp.sync(path.dirname(logPath));
}
function fail(errorMessage): void {
console.error(errorMessage);
process.exit(1);