diff --git a/src/cli.js b/src/cli.js index 4746b44..afdf9ff 100755 --- a/src/cli.js +++ b/src/cli.js @@ -26,7 +26,7 @@ const hRule = chalk.gray("─".repeat(process.stdout.columns)); const CONFIG_FILENAME = 'smashtest.json'; -const PROGRESS_BAR_ON = true; +// const PROGRESS_BAR_ON = true; let fullRun = false; console.log(hRule); @@ -162,6 +162,7 @@ Options --no-debug Fail if there are any $'s or ~'s. Useful to prevent debugging in CI. --output-errors= Whether to output all errors to console --p:="" Set a persistent variable + --progress-bar= Whether to output a progress bar --random= Whether to randomize the order of branches --recursive Scan the current directory and subdirectories for .smash files --repl Open the REPL (drive Smashtest from command line) (-r) @@ -213,6 +214,10 @@ Options runner.persistent[varName] = value; break; + case "progress-bar": + runner.showProgressBar = boolValue(); + break; + case "random": runner.random = boolValue(); break; @@ -488,6 +493,7 @@ function plural(count) { // Output errors to console by default, do not output all steps to console by default runner.outputErrors = true; runner.consoleOutput = false; + runner.showProgressBar = true; // No reporter for debug or repl runs if(tree.isDebug || runner.isRepl) { @@ -792,7 +798,7 @@ function plural(count) { let progressBar = null; fullRun = true; - if(PROGRESS_BAR_ON) { + if(runner.showProgressBar) { // Progress bar progressBar = generateProgressBar(true); progressBar.start(tree.counts.totalSteps, tree.counts.totalStepsComplete);