Skip to content

add usenode18 flag #312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions commands/utils/set_args.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,16 @@ function sync_args_from_cmd(args) {
lt_config["run_settings"]["network_http2"] = false;
}

if ("useNode18" in args) {
if (args["useNode18"] == "true") {
lt_config.run_settings.useNode18 = true;
} else {
lt_config.run_settings.useNode18 = false;
}
} else if (lt_config["run_settings"]["useNode18"] && !lt_config["run_settings"]["useNode18"]) {
lt_config["run_settings"]["useNode18"] = false;
}

if ("network_ws" in args) {
if (args["network_ws"] == "true") {
lt_config.run_settings.network_ws = true;
Expand Down
7 changes: 7 additions & 0 deletions commands/utils/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ module.exports = validate_config = function (lt_config, validation_configs) {
}
}

//validate if network_http2 field contains expected value
if ("useNode18" in lt_config["run_settings"]) {
if (![true, false].includes(lt_config["run_settings"]["useNode18"])) {
reject("Error!! boolean value is expected in useNode18 key");
}
}

if (
"downloads" in lt_config["run_settings"] &&
lt_config["run_settings"]["downloads"] != ""
Expand Down
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ const argv = require("yargs")
describe: "Bypass web socket calls for Network logs",
type: "bool",
})
.option("node18", {
alias: "useNode18",
describe: "Use node version 18 for cypress",
type: "bool",
})
.option("net_sse", {
alias: "network_sse",
describe: "Bypass sse events calls for Network logs",
Expand Down