Files
zoff/server/node_modules/emoji-strip/tests/emoji-strip.js
Kasper Rynning-Tønnesen 5b626696bd Added files
2015-07-07 21:44:09 +02:00

23 lines
871 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var tape = require('tape'),
emojiStrip = require('..'),
emoji
;
tape('strip emoji', function (t) {
emoji = 'thumbs-up👍 for staying strong💪 without emoji please🙏';
t.equal(emojiStrip(emoji), 'thumbs-up for staying strong without emoji please');
emoji = 'dealing with emoji😡 makes me feel like poop💩';
t.equal(emojiStrip(emoji), 'dealing with emoji makes me feel like poop');
t.end();
});
tape('dont magically remove digits', function (t) {
emoji = '9999 ways to die🔫 in the west';
t.equal(emojiStrip(emoji), '9999 ways to die in the west');
emoji = '⚡zero 0 🐗one 1 🐴two 2 🐋three 3 🎃four 4 🍌five 5 🍻six 6 💣seven 7 🍪eight 8 eight emoji ah ah ah';
t.equal(emojiStrip(emoji), 'zero 0 one 1 two 2 three 3 four 4 five 5 six 6 seven 7 eight 8 eight emoji ah ah ah');
t.end();
});