Created
March 18, 2019 23:33
-
-
Save ajcrites/dad4684c3f1dee97e540b8fc5046e4ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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], | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment