40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
import { expect, tap } from '@push.rocks/tapbundle';
|
|
|
|
import * as consolecolor from '../ts/index.js';
|
|
|
|
tap.test('should produce a blue font', async () => {
|
|
console.log(consolecolor.coloredString('this is a blue font, no background', 'blue'));
|
|
});
|
|
|
|
tap.test('should produce a red string with green background', async () => {
|
|
console.log(
|
|
consolecolor.coloredString('this is a red font with green background', 'red', 'green')
|
|
);
|
|
});
|
|
|
|
tap.test('should produce different font colors', async () => {
|
|
console.log(
|
|
consolecolor.coloredString('blue', 'blue'),
|
|
consolecolor.coloredString('brown', 'brown'),
|
|
consolecolor.coloredString('red', 'red'),
|
|
consolecolor.coloredString('orange', 'orange'),
|
|
consolecolor.coloredString('green', 'green'),
|
|
consolecolor.coloredString('pink', 'pink'),
|
|
consolecolor.coloredString('cyan', 'cyan')
|
|
);
|
|
});
|
|
|
|
tap.test('should produce different background colors', async () => {
|
|
console.log(
|
|
consolecolor.coloredString('blue', 'white', 'blue'),
|
|
consolecolor.coloredString('brown', 'white', 'brown'),
|
|
consolecolor.coloredString('red', 'white', 'red'),
|
|
consolecolor.coloredString('orange', 'white', 'orange'),
|
|
consolecolor.coloredString('green', 'white', 'green'),
|
|
consolecolor.coloredString('pink', 'white', 'pink'),
|
|
consolecolor.coloredString('cyan', 'white', 'cyan')
|
|
);
|
|
});
|
|
|
|
tap.start();
|