Skip to content

Commit

Permalink
Uncomment PR #43 specs
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneLem committed Feb 17, 2017
1 parent 00fdf61 commit 5c27f17
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
23 changes: 11 additions & 12 deletions src/components/pickerSpec.js
Expand Up @@ -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 = {
Expand Down
11 changes: 5 additions & 6 deletions src/utils/emoji-indexSpec.js
Expand Up @@ -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');
});
});
});

0 comments on commit 5c27f17

Please sign in to comment.