diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-09-06 23:04:13 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-09-06 23:11:58 -0700 |
commit | d8bd57901e33a7057e26e782e295099ffcc0da89 (patch) | |
tree | e12dfc8cad42b1576756d19d7fbfd82646a009bf /webapp/tests/utils/formatting_at_mentions.test.jsx | |
parent | 7bc8e9a08dfde56387f946fdf5086252aa4d0491 (diff) | |
download | chat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.gz chat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.bz2 chat-d8bd57901e33a7057e26e782e295099ffcc0da89.zip |
Removing webapp
Diffstat (limited to 'webapp/tests/utils/formatting_at_mentions.test.jsx')
-rw-r--r-- | webapp/tests/utils/formatting_at_mentions.test.jsx | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/webapp/tests/utils/formatting_at_mentions.test.jsx b/webapp/tests/utils/formatting_at_mentions.test.jsx deleted file mode 100644 index e9147b565..000000000 --- a/webapp/tests/utils/formatting_at_mentions.test.jsx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import assert from 'assert'; - -import * as TextFormatting from 'utils/text_formatting.jsx'; - -describe('TextFormatting.AtMentions', function() { - it('At mentions', function() { - assert.equal( - TextFormatting.autolinkAtMentions('@user', new Map()), - '$MM_ATMENTION0', - 'should replace mention with token' - ); - - assert.equal( - TextFormatting.autolinkAtMentions('abc"@user"def', new Map()), - 'abc"$MM_ATMENTION0"def', - 'should replace mention surrounded by punctuation with token' - ); - - assert.equal( - TextFormatting.autolinkAtMentions('@user1 @user2', new Map()), - '$MM_ATMENTION0 $MM_ATMENTION1', - 'should replace multiple mentions with tokens' - ); - - assert.equal( - TextFormatting.autolinkAtMentions('@user1/@user2/@user3', new Map()), - '$MM_ATMENTION0/$MM_ATMENTION1/$MM_ATMENTION2', - 'should replace multiple mentions with tokens' - ); - - assert.equal( - TextFormatting.autolinkAtMentions('@us_-e.r', new Map()), - '$MM_ATMENTION0', - 'should replace multiple mentions containing punctuation with token' - ); - - assert.equal( - TextFormatting.autolinkAtMentions('@user.', new Map()), - '$MM_ATMENTION0', - 'should capture trailing punctuation as part of mention' - ); - }); - - it('Not at mentions', function() { - assert.equal( - TextFormatting.autolinkAtMentions('user@host', new Map()), - 'user@host' - ); - - assert.equal( - TextFormatting.autolinkAtMentions('user@email.com', new Map()), - 'user@email.com' - ); - }); -}); |