Skip to content

Commit

Permalink
test(colors): complete colors.getColorByName testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sabertazimi committed Aug 4, 2021
1 parent 967f0c0 commit 0567e79
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/config/colors.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { ColorPalette, getColorByName } from './colors';

describe('Colors', () => {
const tagsColor = [
['CS', ColorPalette.grape],
['CSS', ColorPalette.violet],
['Git', ColorPalette.violet],
['Gnu', ColorPalette.violet],
['Vim', ColorPalette.violet],
['HTML', ColorPalette.indigo],
['Linux', ColorPalette.blue],
['React', ColorPalette.blue],
['Redux', ColorPalette.blue],
['Security', ColorPalette.green],
['JavaScript', ColorPalette.yellow],
['Development', ColorPalette.orange],
['Architecture', ColorPalette.red],
['React Router', ColorPalette.red],
['Design Patterns', ColorPalette.violet],
['Web Development', ColorPalette.violet],
['Computer Science', ColorPalette.indigo],
['Frontend Development', ColorPalette.green],
];

test.each(tagsColor)('should set color of tag [%s] to [%s]', (tag, color) => {
expect(getColorByName(tag)).toBe(color);
});
});

0 comments on commit 0567e79

Please sign in to comment.