Skip to content

Commit

Permalink
Change all console format grey to dim fixes #1699
Browse files Browse the repository at this point in the history
Add updated jest snapshot for ConsoleReporter
  • Loading branch information
tribou committed Nov 5, 2016
1 parent ea35fe9 commit 390c054
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions __tests__/reporters/__snapshots__/console-reporter.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Object {
exports[`test ConsoleReporter.command 1`] = `
Object {
"stderr": "",
"stdout": "[2K[1G[90m$ foobar[39m",
"stdout": "[2K[1G[2m$ foobar[22m",
}
`;

Expand Down Expand Up @@ -95,7 +95,7 @@ Object {
exports[`test ConsoleReporter.step 1`] = `
Object {
"stderr": "",
"stdout": "[2K[1G[90m[1/5][39m foboar...",
"stdout": "[2K[1G[2m[1/5][22m foboar...",
}
`;
Expand Down
10 changes: 5 additions & 5 deletions src/reporters/console/console-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default class ConsoleReporter extends BaseReporter {
msg += '...';
}

this.log(`${this.format.grey(`[${current}/${total}]`)} ${msg}`);
this.log(`${this.format.dim(`[${current}/${total}]`)} ${msg}`);
}

inspect(value: mixed) {
Expand Down Expand Up @@ -149,7 +149,7 @@ export default class ConsoleReporter extends BaseReporter {
}

command(command: string) {
this.log(this.format.grey(`$ ${command}`));
this.log(this.format.dim(`$ ${command}`));
}

warn(msg: string) {
Expand All @@ -164,7 +164,7 @@ export default class ConsoleReporter extends BaseReporter {

return new Promise((resolve, reject) => {
read({
prompt: `${this.format.grey('question')} ${question}: `,
prompt: `${this.format.dim('question')} ${question}: `,
silent: !!options.password,
output: this.stdout,
input: this.stdin,
Expand Down Expand Up @@ -203,7 +203,7 @@ export default class ConsoleReporter extends BaseReporter {

let suffix = '';
if (hint) {
suffix += ` (${this.format.grey(hint)})`;
suffix += ` (${this.format.dim(hint)})`;
}
if (color) {
name = this.format[color](name);
Expand Down Expand Up @@ -243,7 +243,7 @@ export default class ConsoleReporter extends BaseReporter {
let current = 0;
const updatePrefix = () => {
spinner.setPrefix(
`${this.format.grey(`[${current === 0 ? '-' : current}/${total}]`)} `,
`${this.format.dim(`[${current === 0 ? '-' : current}/${total}]`)} `,
);
};
const clear = () => {
Expand Down

0 comments on commit 390c054

Please sign in to comment.