2024-03-13 19:02:12 +00:00
|
|
|
import { expect, tap } from '@push.rocks/tapbundle';
|
2017-01-21 17:10:27 +00:00
|
|
|
|
2024-03-13 19:02:12 +00:00
|
|
|
import * as consolecolor from '../ts/index.js';
|
2017-01-21 17:10:27 +00:00
|
|
|
|
2017-08-16 08:42:48 +00:00
|
|
|
tap.test('should produce a blue font', async () => {
|
2024-03-13 19:02:12 +00:00
|
|
|
console.log(consolecolor.coloredString('this is a blue font, no background', 'blue'));
|
2018-07-17 22:12:40 +00:00
|
|
|
});
|
2017-08-16 08:42:48 +00:00
|
|
|
|
|
|
|
tap.test('should produce a red string with green background', async () => {
|
2018-07-17 22:12:40 +00:00
|
|
|
console.log(
|
2024-03-13 19:02:12 +00:00
|
|
|
consolecolor.coloredString('this is a red font with green background', 'red', 'green')
|
2018-07-17 22:12:40 +00:00
|
|
|
);
|
|
|
|
});
|
2017-08-16 08:42:48 +00:00
|
|
|
|
|
|
|
tap.test('should produce different font colors', async () => {
|
|
|
|
console.log(
|
2024-03-13 19:02:12 +00:00
|
|
|
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')
|
2018-07-17 22:12:40 +00:00
|
|
|
);
|
|
|
|
});
|
2017-08-16 08:42:48 +00:00
|
|
|
|
2017-08-16 08:49:38 +00:00
|
|
|
tap.test('should produce different background colors', async () => {
|
2017-08-16 08:42:48 +00:00
|
|
|
console.log(
|
2024-03-13 19:02:12 +00:00
|
|
|
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')
|
2018-07-17 22:12:40 +00:00
|
|
|
);
|
|
|
|
});
|
2017-08-16 08:42:48 +00:00
|
|
|
|
2018-07-17 22:12:40 +00:00
|
|
|
tap.start();
|