mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-03-17 20:22:32 +00:00
feat: tests
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import chalk from 'chalk';
|
||||
// eslint-disable-next-line unicorn/import-style
|
||||
import type {ChalkInstance} from 'chalk';
|
||||
import {LogLevel} from '../logger.js';
|
||||
import {Transformation} from '../transformation.js';
|
||||
|
||||
@@ -31,7 +33,8 @@ export class Colorize implements Transformation {
|
||||
* @param logLevelToColor Map from log level to color transformation to apply
|
||||
*/
|
||||
constructor(
|
||||
private readonly logLevelToColor: {[k in LogLevel]: chalk.Chalk} = {
|
||||
// not entirely sure why we can't just use the functions directly here
|
||||
private readonly logLevelToColor: {[k in LogLevel]: ChalkInstance} = {
|
||||
ERROR: chalk.bold.red,
|
||||
INFO: chalk.cyan,
|
||||
LOG: chalk.white,
|
||||
|
||||
Reference in New Issue
Block a user