e2ed
Version:
E2E testing framework over Playwright
27 lines (26 loc) • 1.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFullPackConfig = void 0;
// eslint-disable-next-line import/no-internal-modules
const readStartInfoSync_1 = require("../fs/readStartInfoSync");
const updateConfig_1 = require("./updateConfig");
let updatedConfig;
/**
* Get full pack configuration object.
* This function can only be called after the `E2edRunEvent` is registered,
* because the packs with configurations (`e2ed/packs`) is compiled when this event is registered.
*/
const getFullPackConfig = () => {
if (updatedConfig === undefined) {
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
const fullPackConfig = require('../../config').default;
updatedConfig = fullPackConfig;
try {
const startInfo = (0, readStartInfoSync_1.readStartInfoSync)();
(0, updateConfig_1.updateConfig)(updatedConfig, startInfo);
}
catch { }
}
return updatedConfig;
};
exports.getFullPackConfig = getFullPackConfig;