UNPKG

e2ed

Version:

E2E testing framework over Playwright

28 lines (27 loc) 889 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.updateConfig = void 0; const object_1 = require("../object"); const skippedFields = [ 'doAfterPack', 'doBeforePack', 'fullMocks', 'matchScreenshot', ]; /** * Updates full pack config by values from `startInfo` (getted by `doBeforePack` functions). * @internal */ const updateConfig = (fullPackConfig, startInfo) => { for (const field of (0, object_1.getKeys)(fullPackConfig)) { if (skippedFields.includes(field)) { continue; } if (typeof fullPackConfig[field] === 'function') { continue; } // @ts-expect-error: full pack config have different types of field values fullPackConfig[field] = startInfo.fullPackConfig[field]; // eslint-disable-line no-param-reassign } }; exports.updateConfig = updateConfig;