Skip to content

A platform for community discussion. Free, open, simple.

DEV: Allow smoke test failure screenshot path to be configured.

Guo Xiang Tan30279a484376
diff --git a/test/smoke_test.js b/test/smoke_test.js
index 6ec52d55be4..d38a23dbf3d 100644
--- a/test/smoke_test.js
+++ b/test/smoke_test.js
@@ -26,7 +26,7 @@ const path = require('path');
});
const takeFailureScreenshot = function() {
- const screenshotPath = 'tmp/smoke-test.png';
+ const screenshotPath = `${process.env.SCREENSHOT_PATH || 'tmp'}/smoke-test.png`;
console.log(`Screenshot of failure taken at ${screenshotPath}`);
return page.screenshot({ path: screenshotPath, fullPage: true });
};