diff --git a/lib/js/tests/tests.html b/lib/js/tests/tests.html index 3bad42801..63bb87918 100644 --- a/lib/js/tests/tests.html +++ b/lib/js/tests/tests.html @@ -14,11 +14,11 @@ QUnit.module("toImage"); QUnit.test( "test toImage", function( assert ) { - assert.equal(emojione.toImage("Hello world! 😄 :smile:"), "Hello world! \"😄\" \"😄\""); + assert.equal(emojione.toImage("Hello world! 😄 :smile:"), "Hello world! \"😄\" \"😄\""); }); QUnit.test( "mixed ascii, regular unicode and duplicate emoji", function( assert ) { - assert.equal(emojione.toImage(":alien: is 👽 and 저 is not :alien: or :alien: also :randomy: is not emoji"), "\"👽\" is \"👽\" and 저 is not \"👽\" or \"👽\" also :randomy: is not emoji"); + assert.equal(emojione.toImage(":alien: is 👽 and 저 is not :alien: or :alien: also :randomy: is not emoji"), "\"👽\" is \"👽\" and 저 is not \"👽\" or \"👽\" also :randomy: is not emoji"); }); @@ -73,27 +73,27 @@ QUnit.module("shortnameToImage"); QUnit.test( "single shortname character conversion", function( assert ) { - assert.equal(emojione.shortnameToImage("Hello world! 😄 :smile:"), "Hello world! 😄 \"😄\""); + assert.equal(emojione.shortnameToImage("Hello world! 😄 :smile:"), "Hello world! 😄 \"😄\""); }); QUnit.test( "shortname at start of sentence with apostrophe", function( assert ) { - assert.equal(emojione.shortnameToImage(":snail:'s are cool!"), "\"🐌\"'s are cool!"); + assert.equal(emojione.shortnameToImage(":snail:'s are cool!"), "\"🐌\"'s are cool!"); }); QUnit.test( "shortname shares a colon", function( assert ) { - assert.equal(emojione.shortnameToImage(":invalid:snail:"), ":invalid\"🐌\""); + assert.equal(emojione.shortnameToImage(":invalid:snail:"), ":invalid\"🐌\""); }); QUnit.test( "mixed ascii, regular unicode and duplicate emoji", function( assert ) { - assert.equal(emojione.shortnameToImage(":alien: is 👽 and 저 is not :alien: or :alien: also :randomy: is not emoji"), "\"👽\" is 👽 and 저 is not \"👽\" or \"👽\" also :randomy: is not emoji"); + assert.equal(emojione.shortnameToImage(":alien: is 👽 and 저 is not :alien: or :alien: also :randomy: is not emoji"), "\"👽\" is 👽 and 저 is not \"👽\" or \"👽\" also :randomy: is not emoji"); }); QUnit.test( "multiline emoji string", function( assert ) { - assert.equal(emojione.shortnameToImage(":dancer:\n:dancer:"), "\"💃\"\n\"💃\""); + assert.equal(emojione.shortnameToImage(":dancer:\n:dancer:"), "\"💃\"\n\"💃\""); }); QUnit.test( "triple emoji string", function( assert ) { - assert.equal(emojione.shortnameToImage(":dancer::dancer::alien:"), "\"💃\"\"💃\"\"👽\""); + assert.equal(emojione.shortnameToImage(":dancer::dancer::alien:"), "\"💃\"\"💃\"\"👽\""); }); @@ -123,15 +123,15 @@ QUnit.module("toImage"); QUnit.test( "single character shortname conversion", function( assert ) { - assert.equal(emojione.toImage("Hello world! 😄 :smile:"), "Hello world! \"😄\" \"😄\""); + assert.equal(emojione.toImage("Hello world! 😄 :smile:"), "Hello world! \"😄\" \"😄\""); }); QUnit.test( "shortname shares a colon", function( assert ) { - assert.equal(emojione.toImage(":invalid:snail:"), ":invalid\"🐌\""); + assert.equal(emojione.toImage(":invalid:snail:"), ":invalid\"🐌\""); }); QUnit.test( "single unicode character conversion", function( assert ) { - assert.equal(emojione.toImage("🐌"), "\"🐌\""); + assert.equal(emojione.toImage("🐌"), "\"🐌\""); }); diff --git a/lib/js/tests/validate.json b/lib/js/tests/validate.json index 45ff10dfe..ca26a31fb 100644 --- a/lib/js/tests/validate.json +++ b/lib/js/tests/validate.json @@ -6,12 +6,12 @@ { "description": "test toImage", "text": "Hello world! 😄 :smile:", - "expected": "Hello world! \\\"😄\\\" \\\"😄\\\"" + "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" + "expected": "\\\"👽\\\" is \\\"👽\\\" and 저 is not \\\"👽\\\" or \\\"👽\\\" also :randomy: is not emoji" } ] }, @@ -81,32 +81,32 @@ { "description": "single shortname character conversion", "text": "Hello world! 😄 :smile:", - "expected": "Hello world! 😄 \\\"😄\\\"" + "expected": "Hello world! 😄 \\\"😄\\\"" }, { "description": "shortname at start of sentence with apostrophe", "text": ":snail:'s are cool!", - "expected": "\\\"🐌\\\"'s are cool!" + "expected": "\\\"🐌\\\"'s are cool!" }, { "description": "shortname shares a colon", "text": ":invalid:snail:", - "expected": ":invalid\\\"🐌\\\"" + "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" + "expected": "\\\"👽\\\" is 👽 and 저 is not \\\"👽\\\" or \\\"👽\\\" also :randomy: is not emoji" }, { "description": "multiline emoji string", "text": ":dancer:\\n:dancer:", - "expected": "\\\"💃\\\"\\n\\\"💃\\\"" + "expected": "\\\"💃\\\"\\n\\\"💃\\\"" }, { "description": "triple emoji string", "text": ":dancer::dancer::alien:", - "expected": "\\\"💃\\\"\\\"💃\\\"\\\"👽\\\"" + "expected": "\\\"💃\\\"\\\"💃\\\"\\\"👽\\\"" } ] }, @@ -146,17 +146,17 @@ { "description": "single character shortname conversion", "text": "Hello world! 😄 :smile:", - "expected": "Hello world! \\\"😄\\\" \\\"😄\\\"" + "expected": "Hello world! \\\"😄\\\" \\\"😄\\\"" }, { "description": "shortname shares a colon", "text": ":invalid:snail:", - "expected": ":invalid\\\"🐌\\\"" + "expected": ":invalid\\\"🐌\\\"" }, { "description": "single unicode character conversion", "text": "🐌", - "expected": "\\\"🐌\\\"" + "expected": "\\\"🐌\\\"" } ] }