emoji_test.go 424 B

1234567891011121314
  1. package config
  2. import (
  3. "github.com/stretchr/testify/assert"
  4. "testing"
  5. )
  6. func TestGetEmojiByShortName(t *testing.T) {
  7. assert.Equal(t, "😀", lookupHTMLIcon("smile", "empty"), "Find an eomji by short name")
  8. assert.Equal(t, "empty", lookupHTMLIcon("", "empty"), "Find an eomji when the value is empty")
  9. assert.Equal(t, "notfound", lookupHTMLIcon("notfound", "empty"), "Find an eomji by undefined short name")
  10. }