Uncomment PR #43 specs

nolan/hinaloe-test
Etienne Lemay 2017-02-17 09:47:14 -05:00
parent 00fdf6137a
commit 5c27f17154
2 changed files with 16 additions and 18 deletions

View File

@ -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 = {

View File

@ -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');
});
});
});