forked from mattermost/mattermost-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MM-18913: Migrate latinise.tsx and tests to Typescript (mattermost#3821)
* Migrate latinise.tsx and tests to Typescript * Remove inner describe
- Loading branch information
1 parent
c9c7a78
commit 0d988eb
Showing
4 changed files
with
25 additions
and
27 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. | ||
// See LICENSE.txt for license information. | ||
|
||
import {latinise} from 'utils/latinise'; | ||
|
||
describe('Latinise', () => { | ||
test('should return ascii version of Dév Spé', () => { | ||
expect(latinise('Dév Spé')). | ||
toEqual('Dev Spe'); | ||
}); | ||
|
||
test('should not replace any characters', () => { | ||
expect(latinise('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890')). | ||
toEqual('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'); | ||
}); | ||
|
||
test('should replace characters with diacritics with ascii equivalents', () => { | ||
expect(latinise('àáâãäåæçèéêëìíîïñòóôõöœùúûüýÿ')). | ||
toEqual('aaaaaaaeceeeeiiiinooooooeuuuuyy'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters