playwright-archive
Version:
A lightweight CLI tool to archive and serve your Playwright test run history with a web interface. Useful for CI environments and local development.
21 lines (19 loc) • 555 B
JavaScript
const fs = require('fs-extra');
const path = require('path');
/**
* @returns {import('../types/config').PlaywrightArchiveConfig}
*/
function loadUserConfig() {
const configPath = path.resolve(process.cwd(), 'playwright-archive.config.js');
if (fs.existsSync(configPath)) {
try{
const userConfig = require(configPath);
return userConfig;
}catch (error) {
console.error("Error loading user playwright-archive config");
throw error;
}
}
return {};
}
module.exports = loadUserConfig;