From 5c27f17154376ab2e4d13b2671ee391a489fe4f6 Mon Sep 17 00:00:00 2001 From: Etienne Lemay Date: Fri, 17 Feb 2017 09:47:14 -0500 Subject: [PATCH] Uncomment PR #43 specs --- src/components/pickerSpec.js | 23 +++++++++++------------ src/utils/emoji-indexSpec.js | 11 +++++------ 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/components/pickerSpec.js b/src/components/pickerSpec.js index 663fe1c..5c26513 100644 --- a/src/components/pickerSpec.js +++ b/src/components/pickerSpec.js @@ -20,18 +20,17 @@ describe('Picker', () => { expect(subject).toBeDefined(); }); - // This is the unit test for pull request (https://github.com/missive/emoji-mart/pull/43) - // describe('categories', () => { - // it('shows 10 by default', () => { - // subject = render(); - // expect(subject.categories.length).toEqual(10); - // }); - // - // it('will not show some based upon our filter', () => { - // subject = render({emojisToShowFilter: (unified) => false}); - // expect(subject.categories.length).toEqual(2); - // }); - // }); + describe('categories', () => { + it('shows 10 by default', () => { + subject = render(); + expect(subject.categories.length).toEqual(10); + }); + + it('will not show some based upon our filter', () => { + subject = render({emojisToShowFilter: (unified) => false}); + expect(subject.categories.length).toEqual(2); + }); + }); function render(props = {}) { const defaultProps = { diff --git a/src/utils/emoji-indexSpec.js b/src/utils/emoji-indexSpec.js index 5be8d90..9c74258 100644 --- a/src/utils/emoji-indexSpec.js +++ b/src/utils/emoji-indexSpec.js @@ -13,11 +13,10 @@ describe('#emojiIndex', () => { }]); }); - // This is the unit test for pull request (https://github.com/missive/emoji-mart/pull/43) - // it('should filter only emojis we care about, exclude pineapple', () => { - // let emojisToShowFilter = (unified) => unified !== '1F34D'; - // expect(emojiIndex.search('apple', emojisToShowFilter).map((obj) => obj.id)) - // .not.toContain('pineapple'); - // }); + it('should filter only emojis we care about, exclude pineapple', () => { + let emojisToShowFilter = (unified) => unified !== '1F34D'; + expect(emojiIndex.search('apple', emojisToShowFilter).map((obj) => obj.id)) + .not.toContain('pineapple'); + }); }); });