Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import { colorReducer, updateHex } from '../colorReducer';
  2.  
  3. describe('colorReducer', () => {
  4. test('update color with valid hex', () => {
  5. const initialState = {};
  6. const testHex = '#abcdef';
  7.  
  8. const newState = colorReducer(initialState, updateHex(testHex));
  9.  
  10. expect(newState).toEqual({
  11. hex: testHex,
  12. rgba: [171, 205, 239, 1],
  13. });
  14. });
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement