Skip to content

Commit

Permalink
chore: use EmojiDefinition type
Browse files Browse the repository at this point in the history
  • Loading branch information
Yizack committed Feb 9, 2024
1 parent efa3ca9 commit 0e52c01
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/twemoji.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { describe, it, expect } from 'vitest'
import { fileURLToPath } from 'node:url'
import { setup, $fetch } from '@nuxt/test-utils'
import type { EmojiDefinition } from '~/src/runtime/assets/emojis'

const alts: { [key: string]: string } = {
codepoint: '1f680',
const alts: EmojiDefinition = {
code: '1f680',
name: 'rocket',
emoji: '🚀'
}
Expand All @@ -26,7 +27,7 @@ describe('Twemoji component tests', () => {

it('by codepoint: renders emoji as <img>', async () => {
const html = await $fetch('/Twemoji/byCodePoint/png')
expect(html).toContain(expected.img(alts.codepoint))
expect(html).toContain(expected.img(alts.code))
})

it('by emoji: renders emoji as <svg>', async () => {
Expand Down

0 comments on commit 0e52c01

Please sign in to comment.