You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
430 B
TypeScript
23 lines
430 B
TypeScript
5 years ago
|
import { colorHtmlToInt, colorIntToHtml } from './journal-processors';
|
||
|
|
||
|
it('Color conversion', () => {
|
||
|
const testColors = [
|
||
|
'#aaaaaaaa',
|
||
|
'#00aaaaaa',
|
||
|
'#0000aaaa',
|
||
|
'#000000aa',
|
||
|
'#00000000',
|
||
|
'#bb00bbbb',
|
||
|
'#bb0000bb',
|
||
|
'#bb000000',
|
||
|
'#11110011',
|
||
|
'#11110000',
|
||
|
'#11111100',
|
||
|
];
|
||
|
|
||
|
for (const color of testColors) {
|
||
|
expect(color).toEqual(colorIntToHtml(colorHtmlToInt(color)));
|
||
|
}
|
||
|
});
|
||
|
|