daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top