Skip to content

Commit

Permalink
Merge pull request #7245 from jdivy/provide-headless-option-in-regula…
Browse files Browse the repository at this point in the history
…r-tests

Allow `--headless` option for `test` and `test-packages`.

The `--headless` option was initially implemented only for `self-test`,
but it makes sense for other kinds of tests, too.
  • Loading branch information
benjamn committed Jun 17, 2016
2 parents 88111e2 + 4b584c1 commit fbfa1b5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/cli/commands.js
Expand Up @@ -1413,6 +1413,10 @@ testCommandOptions = {
deploy: { type: String },
production: { type: Boolean },
settings: { type: String },
// Indicates whether these self-tests are running headless, e.g. in a
// continuous integration testing environment, where visual niceties
// like progress bars and spinners are unimportant.
headless: { type: Boolean },
verbose: { type: Boolean, short: "v" },

// Undocumented. See #Once
Expand Down Expand Up @@ -1489,6 +1493,9 @@ function doTestCommand(options) {
global.testCommandMetadata = {};

Console.setVerbose(!!options.verbose);
if (options.headless) {
Console.setHeadless(true);
}

const runTargets = parseRunTargets(_.intersection(
Object.keys(options), ['ios', 'ios-device', 'android', 'android-device']));
Expand Down

0 comments on commit fbfa1b5

Please sign in to comment.