Skip to content

Commit

Permalink
Merge pull request #114 from LambdaTest/dev
Browse files Browse the repository at this point in the history
regex change
  • Loading branch information
japneetlambdatest authored Feb 27, 2022
2 parents dea68f0 + 1d25b64 commit 471577e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions commands/utils/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,19 @@ module.exports = validate_config = function (lt_config, validation_configs) {
}

if (lt_config["run_settings"]["cypress_settings"] != "") {
for (let i = 0; i < validation_configs.blacklistCommands.length; i++) {
validation_configs.blacklistCommands[i] = new RegExp(
validation_configs.blacklistCommands[i]
);
}
let settings = lt_config["run_settings"]["cypress_settings"].split(";");
//let setting_names = [];
let settings_flag = true;
let setting_param = "";
for (let i = 0; i < settings.length; i++) {
if (
validation_configs.blacklistCommands.includes(
settings[i].split(" ")[0]
validation_configs.blacklistCommands.some((rx) =>
rx.test(settings[i].split(" ")[0])
)
) {
settings_flag = false;
Expand All @@ -201,7 +206,6 @@ module.exports = validate_config = function (lt_config, validation_configs) {
reject("Smart UI project name is missing");
} else if (lt_config.run_settings.smart_ui.project == "") {
reject("Smart UI porject name can not be blank");

}
}
resolve("Validated the Config");
Expand Down

0 comments on commit 471577e

Please sign in to comment.