mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
refactor!: next generation AFFiNE code structure (#1176)
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
|
||||
import { printer } from './../printer';
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const chalk = require('chalk');
|
||||
test.describe('printer', () => {
|
||||
test('test debug', () => {
|
||||
expect(printer.debug('test debug')).toBe(
|
||||
chalk.green`debug` + chalk.white(' - test debug')
|
||||
);
|
||||
});
|
||||
|
||||
test('test info', () => {
|
||||
expect(printer.info('test info')).toBe(
|
||||
chalk.rgb(19, 167, 205)`info` + chalk.white(' - test info')
|
||||
);
|
||||
});
|
||||
test('test warn', () => {
|
||||
expect(printer.warn('test warn')).toBe(
|
||||
chalk.yellow`warn` + chalk.white(' - test warn')
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -1,18 +0,0 @@
|
||||
import chalk from 'chalk';
|
||||
export const printer = {
|
||||
debug: msg => {
|
||||
const result = chalk.green`debug` + chalk.white(' - ' + msg);
|
||||
console.log(result);
|
||||
return result;
|
||||
},
|
||||
info: msg => {
|
||||
const result = chalk.rgb(19, 167, 205)`info` + chalk.white(' - ' + msg);
|
||||
console.log(result);
|
||||
return result;
|
||||
},
|
||||
warn: msg => {
|
||||
const result = chalk.yellow`warn` + chalk.white(' - ' + msg);
|
||||
console.log(result);
|
||||
return result;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user