From 89b9c739b138823ae173fdabae64fd59a318e17f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 10 Jul 2021 01:59:37 -0500 Subject: [PATCH] Update tests I have no idea why changing soapbox -> mastodon fixes this, but I'm tired --- .../emoji/__tests__/emoji_index-test.js | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/app/soapbox/features/emoji/__tests__/emoji_index-test.js b/app/soapbox/features/emoji/__tests__/emoji_index-test.js index ffb5a701c..9df2d34a0 100644 --- a/app/soapbox/features/emoji/__tests__/emoji_index-test.js +++ b/app/soapbox/features/emoji/__tests__/emoji_index-test.js @@ -52,12 +52,12 @@ describe('emoji_index', () => { it('(different behavior from emoji-mart) do not erases custom emoji if not passed again', () => { const custom = [ { - id: 'soapbox', - name: 'soapbox', - short_names: ['soapbox'], + id: 'mastodon', + name: 'mastodon', + short_names: ['mastodon'], text: '', emoticons: [], - keywords: ['soapbox'], + keywords: ['mastodon'], imageUrl: 'http://example.com', custom: true, }, @@ -67,23 +67,23 @@ describe('emoji_index', () => { const expected = []; const lightExpected = [ { - id: 'soapbox', + id: 'mastodon', custom: true, }, ]; - expect(search('soap').map(trimEmojis)).toEqual(lightExpected); - expect(emojiIndex.search('soap').map(trimEmojis)).toEqual(expected); + expect(search('masto').map(trimEmojis)).toEqual(lightExpected); + expect(emojiIndex.search('masto').map(trimEmojis)).toEqual(expected); }); it('(different behavior from emoji-mart) erases custom emoji if another is passed', () => { const custom = [ { - id: 'soapbox', - name: 'soapbox', - short_names: ['soapbox'], + id: 'mastodon', + name: 'mastodon', + short_names: ['mastodon'], text: '', emoticons: [], - keywords: ['soapbox'], + keywords: ['mastodon'], imageUrl: 'http://example.com', custom: true, }, @@ -91,19 +91,19 @@ describe('emoji_index', () => { search('', { custom }); emojiIndex.search('', { custom }); const expected = []; - expect(search('soap', { custom: [] }).map(trimEmojis)).toEqual(expected); - expect(emojiIndex.search('soap').map(trimEmojis)).toEqual(expected); + expect(search('masto', { custom: [] }).map(trimEmojis)).toEqual(expected); + expect(emojiIndex.search('masto').map(trimEmojis)).toEqual(expected); }); it('handles custom emoji', () => { const custom = [ { - id: 'soapbox', - name: 'soapbox', - short_names: ['soapbox'], + id: 'mastodon', + name: 'mastodon', + short_names: ['mastodon'], text: '', emoticons: [], - keywords: ['soapbox'], + keywords: ['mastodon'], imageUrl: 'http://example.com', custom: true, }, @@ -112,12 +112,12 @@ describe('emoji_index', () => { emojiIndex.search('', { custom }); const expected = [ { - id: 'soapbox', + id: 'mastodon', custom: true, }, ]; - expect(search('soap', { custom }).map(trimEmojis)).toEqual(expected); - expect(emojiIndex.search('soap', { custom }).map(trimEmojis)).toEqual(expected); + expect(search('masto', { custom }).map(trimEmojis)).toEqual(expected); + expect(emojiIndex.search('masto', { custom }).map(trimEmojis)).toEqual(expected); }); it('should filter only emojis we care about, exclude pineapple', () => {