From 4b584c10cedf4f0a83c21fcc67f68573c683e8e9 Mon Sep 17 00:00:00 2001 From: Jack Ivy Date: Fri, 17 Jun 2016 13:15:00 -0400 Subject: [PATCH] Allow `--headless` option for `test` and `test-packages` --- tools/cli/commands.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/cli/commands.js b/tools/cli/commands.js index 0d0c73f438a..afcd1504892 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -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 @@ -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']));