From dd0c7b00dc1567104da2b1bb9633a3634c040fd5 Mon Sep 17 00:00:00 2001 From: David Hemphill Date: Sat, 9 Sep 2017 13:26:21 -0500 Subject: [PATCH] Add findColor test --- __tests__/findColor.test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 __tests__/findColor.test.js diff --git a/__tests__/findColor.test.js b/__tests__/findColor.test.js new file mode 100644 index 000000000..0117e6c87 --- /dev/null +++ b/__tests__/findColor.test.js @@ -0,0 +1,10 @@ +import postcss from 'postcss' +import findColor from '../src/util/findColor' + +/** + * Tests + */ +it('finds a color in an object', () => { + let color = findColor({red: '#FF0000', blue: '#0000FF'}, 'red') + expect(color).toEqual(`#FF0000`) +})