1
0
forked from mirror/misskey

Supress logs during test

This commit is contained in:
syuilo 2019-02-08 16:56:23 +09:00
parent 93541f83c8
commit f35688bab8
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -21,6 +21,7 @@ export default class Logger {
private log(level: string, message: string, important = false, subDomains: string[] = []): void { private log(level: string, message: string, important = false, subDomains: string[] = []): void {
if (program.quiet) return; if (program.quiet) return;
if (process.env.NODE_ENV === 'test') return;
const domain = this.color ? chalk.keyword(this.color)(this.domain) : chalk.white(this.domain); const domain = this.color ? chalk.keyword(this.color)(this.domain) : chalk.white(this.domain);
const domains = [domain].concat(subDomains); const domains = [domain].concat(subDomains);
if (this.parentLogger) { if (this.parentLogger) {