summaryrefslogtreecommitdiffstats
path: root/webapp/tests/emoticons.test.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/tests/emoticons.test.jsx')
-rw-r--r--webapp/tests/emoticons.test.jsx47
1 files changed, 0 insertions, 47 deletions
diff --git a/webapp/tests/emoticons.test.jsx b/webapp/tests/emoticons.test.jsx
deleted file mode 100644
index b6ca0512d..000000000
--- a/webapp/tests/emoticons.test.jsx
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-import assert from 'assert';
-
-import EmojiStore from 'stores/emoji_store.jsx';
-import * as Emoticons from 'utils/emoticons.jsx';
-
-describe('Emoticons', function() {
- this.timeout(100000);
-
- it('handleEmoticons', function(done) {
- const emojis = EmojiStore.getEmojis();
-
- assert.equal(
- Emoticons.handleEmoticons(':goat: :dash:', new Map(), emojis),
- '$MM_EMOTICON0 $MM_EMOTICON1',
- 'should replace emoticons with tokens'
- );
-
- assert.equal(
- Emoticons.handleEmoticons(':goat::dash:', new Map(), emojis),
- '$MM_EMOTICON0$MM_EMOTICON1',
- 'should replace emoticons not separated by whitespace'
- );
-
- assert.equal(
- Emoticons.handleEmoticons('/:goat:..:dash:)', new Map(), emojis),
- '/$MM_EMOTICON0..$MM_EMOTICON1)',
- 'should replace emoticons separated by punctuation'
- );
-
- assert.equal(
- Emoticons.handleEmoticons('asdf:goat:asdf:dash:asdf', new Map(), emojis),
- 'asdf$MM_EMOTICON0asdf$MM_EMOTICON1asdf',
- 'should replace emoticons separated by text'
- );
-
- assert.equal(
- Emoticons.handleEmoticons(':asdf: :goat : : dash:', new Map(), emojis),
- ':asdf: :goat : : dash:',
- 'shouldn\'t replace invalid emoticons'
- );
-
- done();
- });
-});