Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { colorReducer, updateHex } from '../colorReducer';
- describe('colorReducer', () => {
- test('update color with valid hex', () => {
- const initialState = {};
- const testHex = '#abcdef';
- const newState = colorReducer(initialState, updateHex(testHex));
- expect(newState).toEqual({
- hex: testHex,
- rgba: [171, 205, 239, 1],
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement