123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- {
- "data": [
- {
- "module":"toImage",
- "tests": [
- {
- "description": "test toImage",
- "text": "Hello world! ๐ :smile:",
- "expected": "Hello world! <img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f604.png?v=2.2.5\\\"/> <img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f604.png?v=2.2.5\\\"/>"
- },
- {
- "description": "mixed ascii, regular unicode and duplicate emoji",
- "text": ":alien: is ๐ฝ and ์ is not :alien: or :alien: also :randomy: is not emoji",
- "expected": "<img class=\\\"emojione\\\" alt=\\\"๐ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> is <img class=\\\"emojione\\\" alt=\\\"๐ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> and ์ is not <img class=\\\"emojione\\\" alt=\\\"๐ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> or <img class=\\\"emojione\\\" alt=\\\"๐ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> also :randomy: is not emoji"
- }
- ]
- },
- {
- "module":"unifyUnicode",
- "tests": [
- {
- "description": "test unifyUnicode",
- "text": "Hello world! ๐ :smile:",
- "expected": "Hello world! ๐ ๐"
- },
- {
- "description": "mixed ascii, regular unicode and duplicate emoji",
- "text": ":alien: is ๐ฝ and ์ is not :alien: or :alien: also :randomy: is not emoji",
- "expected": "๐ฝ is ๐ฝ and ์ is not ๐ฝ or ๐ฝ also :randomy: is not emoji"
- },
- {
- "description": "multiline emoji string",
- "text": ":dancer:\\\n:dancer:",
- "expected": "๐\\\n๐"
- },
- {
- "description": "triple emoji string",
- "text": ":dancer::dancer::alien:",
- "expected": "๐๐๐ฝ"
- }
- ]
- },
- {
- "module": "shortnameToUnicode",
- "tests": [
- {
- "description": "single unicode character conversion",
- "text": "Hello world! ๐ :smile:",
- "expected": "Hello world! ๐ ๐"
- },
- {
- "description": "shortname mid sentence with a comma",
- "text": "The :snail:, is Emoji One's official mascot.",
- "expected": "The ๐, is Emoji One's official mascot."
- },
- {
- "description": "shortname at start of sentence with apostrophe",
- "text": ":snail:'s are cool!",
- "expected": "๐'s are cool!"
- },
- {
- "description": "shortname shares a colon",
- "text": ":invalid:snail:",
- "expected": ":invalid๐"
- },
- {
- "description": "mixed ascii, regular unicode and duplicate emoji",
- "text": ":alien: is ๐ฝ and ์ is not :alien: or :alien: also :randomy: is not emoji",
- "expected": "๐ฝ is ๐ฝ and ์ is not ๐ฝ or ๐ฝ also :randomy: is not emoji"
- },
- {
- "description": "multiline emoji string",
- "text": ":dancer:\\n:dancer:",
- "expected": "๐\\n๐"
- },
- {
- "description": "triple emoji string",
- "text": ":dancer::dancer::alien:",
- "expected": "๐๐๐ฝ"
- }
- ]
- },
- {
- "module": "shortnameToImage",
- "tests": [
- {
- "description": "single shortname character conversion",
- "text": "Hello world! ๐ :smile:",
- "expected": "Hello world! ๐ <img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f604.png?v=2.2.5\\\"/>"
- },
- {
- "description": "shortname at start of sentence with apostrophe",
- "text": ":snail:'s are cool!",
- "expected": "<img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f40c.png?v=2.2.5\\\"/>'s are cool!"
- },
- {
- "description": "shortname shares a colon",
- "text": ":invalid:snail:",
- "expected": ":invalid<img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f40c.png?v=2.2.5\\\"/>"
- },
- {
- "description": "mixed ascii, regular unicode and duplicate emoji",
- "text": ":alien: is ๐ฝ and ์ is not :alien: or :alien: also :randomy: is not emoji",
- "expected": "<img class=\\\"emojione\\\" alt=\\\"๐ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> is ๐ฝ and ์ is not <img class=\\\"emojione\\\" alt=\\\"๐ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> or <img class=\\\"emojione\\\" alt=\\\"๐ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> also :randomy: is not emoji"
- },
- {
- "description": "multiline emoji string",
- "text": ":dancer:\\n:dancer:",
- "expected": "<img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f483.png?v=2.2.5\\\"/>\\n<img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f483.png?v=2.2.5\\\"/>"
- },
- {
- "description": "triple emoji string",
- "text": ":dancer::dancer::alien:",
- "expected": "<img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f483.png?v=2.2.5\\\"/><img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f483.png?v=2.2.5\\\"/><img class=\\\"emojione\\\" alt=\\\"๐ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/>"
- }
- ]
- },
- {
- "module": "toShort",
- "tests": [
- {
- "description": "single unicode character conversion",
- "text": "Hello world! ๐ :smile:",
- "expected": "Hello world! :smile: :smile:"
- },
- {
- "description": "mixed ascii, regular unicode and duplicate emoji",
- "text": "๐ฝ is not :alien: and ์ is not ๐ฝ or ๐ฝ",
- "expected": ":alien: is not :alien: and ์ is not :alien: or :alien:"
- },
- {
- "description": "multiline emoji string",
- "text": "๐\\n๐",
- "expected": ":dancer:\\n:dancer:"
- },
- {
- "description": "alias vs. canonical",
- "text": "๐ฏ๐ต ใฉใใใใใใจใ",
- "expected": ":flag_jp: ใฉใใใใใใจใ"
- },
- {
- "description": "unicode character conversion within excluded tag",
- "text": "<div>๐</div>",
- "expected": "<div>:smile:</div>"
- }
- ]
- },
- {
- "module": "toImage",
- "tests": [
- {
- "description": "single character shortname conversion",
- "text": "Hello world! ๐ :smile:",
- "expected": "Hello world! <img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f604.png?v=2.2.5\\\"/> <img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f604.png?v=2.2.5\\\"/>"
- },
- {
- "description": "shortname shares a colon",
- "text": ":invalid:snail:",
- "expected": ":invalid<img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f40c.png?v=2.2.5\\\"/>"
- },
- {
- "description": "single unicode character conversion",
- "text": "๐",
- "expected": "<img class=\\\"emojione\\\" alt=\\\"๐\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f40c.png?v=2.2.5\\\"/>"
- }
- ]
- }
- ]
- }
|