* Extracts and validates the config for the given experiment. * @param {string} experiment * @return {?Object}
(experiment)
| 31 | * @return {?Object} |
| 32 | */ |
| 33 | function getExperimentConfig(experiment) { |
| 34 | const config = experimentsConfig[experiment]; |
| 35 | const valid = |
| 36 | config?.name && |
| 37 | config?.define_experiment_constant && |
| 38 | config?.expiration_date_utc && |
| 39 | Number(new Date(config.expiration_date_utc)) >= Date.now(); |
| 40 | return valid ? config : null; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Gets the list of files changed on the current branch that match the given |
no test coverage detected