Skip to content

Commit

Permalink
add spinner fallback for Windows
Browse files Browse the repository at this point in the history
The `dots` spinner doesn't work there.
  • Loading branch information
sindresorhus committed Apr 24, 2016
1 parent a727f5e commit c4e58e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/reporters/mini.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function MiniReporter() {
return new MiniReporter();
}

var spinnerDef = spinners.dots;
var spinnerDef = spinners[process.platform === 'win32' ? 'line' : 'dots'];
this.spinnerFrames = spinnerDef.frames.map(function (c) {
return chalk.gray.dim(c);
});
Expand Down
2 changes: 1 addition & 1 deletion test/reporters/mini.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var compareLineOutput = require('../helper/compare-line-output');

chalk.enabled = true;

var graySpinner = chalk.gray.dim('⠋');
var graySpinner = chalk.gray.dim(process.platform === 'win32' ? '-' : '⠋');

// Needed because tap doesn't emulate a tty environment and thus this is
// undefined, making `cli-truncate` append '...' to test titles
Expand Down

0 comments on commit c4e58e3

Please sign in to comment.