Function withArguments
Returns the settings overridden by the command line arguments and the agent harness reporter
Example
withArguments returns the settings unchanged for empty arguments
Settings() .withArguments(RunArguments()) .should .equal(Settings());
Example
withArguments returns the reporters ["tap"] when the arguments have the reporters ["tap"]
RunArguments arguments;
arguments .reporters = ["tap"];
Settings() .withArguments(arguments) .reporters .should .equal(["tap"]);
Example
withArguments returns the executor "parallel" when the arguments have the executor "parallel"
RunArguments arguments;
arguments .executor = "parallel";
Settings() .withArguments(arguments) .executor .should .equal("parallel");
Example
withArguments returns the file reporters and agent for an agent harness without reporter arguments
Settings() .withArguments(RunArguments(), true) .reporters .should .equal(["stats", "html", "allure", "xunit", "agent"]);
Example
withArguments returns the reporters ["visualtrial"] for an agent harness with the reporters ["visualtrial"]
RunArguments arguments;
arguments .reporters = ["visualtrial"];
Settings() .withArguments(arguments, true) .reporters .should .equal(["visualtrial"]);