diff options
Diffstat (limited to 'spec/frontend/behaviors/gl_emoji_spec.js')
-rw-r--r-- | spec/frontend/behaviors/gl_emoji_spec.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/frontend/behaviors/gl_emoji_spec.js b/spec/frontend/behaviors/gl_emoji_spec.js index c7f4fce0e4c..ef40179c23b 100644 --- a/spec/frontend/behaviors/gl_emoji_spec.js +++ b/spec/frontend/behaviors/gl_emoji_spec.js @@ -15,20 +15,22 @@ jest.mock('~/lib/graphql', () => { }); describe('gl_emoji', () => { - const emojiData = { - grey_question: { + const emojiData = [ + { + n: 'grey_question', c: 'symbols', e: '❔', d: 'white question mark ornament', u: '6.0', }, - bomb: { + { + n: 'bomb', c: 'objects', e: '💣', d: 'bomb', u: '6.0', }, - }; + ]; beforeAll(() => { jest.spyOn(EmojiUnicodeSupport, 'default').mockReturnValue(true); @@ -119,7 +121,7 @@ describe('gl_emoji', () => { await waitForPromises(); expect(glEmojiElement.outerHTML).toBe( - '<gl-emoji data-name=""x="y" onload="alert(document.location.href)"" data-unicode-version="x"><img class="emoji" title=":"x="y" onload="alert(document.location.href)":" alt=":"x="y" onload="alert(document.location.href)":" src="/-/emojis/2/grey_question.png" align="absmiddle"></gl-emoji>', + '<gl-emoji data-name=""x="y" onload="alert(document.location.href)"" data-unicode-version="x"><img class="emoji" title=":"x="y" onload="alert(document.location.href)":" alt=":"x="y" onload="alert(document.location.href)":" src="/-/emojis/3/grey_question.png" align="absmiddle"></gl-emoji>', ); }); |