refactor!: next generation AFFiNE code structure (#1176)

This commit is contained in:
Himself65
2023-03-01 01:40:01 -06:00
committed by GitHub
parent 2dcccc772c
commit e0481d29ad
270 changed files with 8308 additions and 6829 deletions

View File

@@ -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')
);
});
});

View File

@@ -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;
},
};