Files
AFFiNE-Mirror/packages/app/scripts/__tests__/printer.spec.ts
T
Chi Zhang 4dfccf5c95 feat: printer next (#601)
* feat: add printer and next.js logger style

* chore: add info for API Proxy

* tests: unit test cases is added to printer

* fix: deps

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2022-12-29 02:20:57 +00:00

22 lines
599 B
TypeScript

import { describe, test, expect } from '@jest/globals';
import { printer } from './../printer';
const chalk = require('chalk');
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')
);
});
});