mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 22:07:10 -04:00
feat(new-tool): added unicode conversion utilities (#858)
* feat: add Text to Unicode tool * Update src/tools/text-to-unicode/index.ts --------- Co-authored-by: Corentin THOMASSET <corentin.thomasset74@gmail.com>
This commit is contained in:
parent
670f735501
commit
c46207f1bb
7 changed files with 103 additions and 0 deletions
20
src/tools/text-to-unicode/text-to-unicode.service.test.ts
Normal file
20
src/tools/text-to-unicode/text-to-unicode.service.test.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { describe, expect, it } from 'vitest';
|
||||
import { convertTextToUnicode, convertUnicodeToText } from './text-to-unicode.service';
|
||||
|
||||
describe('text-to-unicode', () => {
|
||||
describe('convertTextToUnicode', () => {
|
||||
it('a text string is converted to unicode representation', () => {
|
||||
expect(convertTextToUnicode('A')).toBe('A');
|
||||
expect(convertTextToUnicode('linke the string convert to unicode')).toBe('linke the string convert to unicode');
|
||||
expect(convertTextToUnicode('')).toBe('');
|
||||
});
|
||||
});
|
||||
|
||||
describe('convertUnicodeToText', () => {
|
||||
it('an unicode string is converted to its text representation', () => {
|
||||
expect(convertUnicodeToText('A')).toBe('A');
|
||||
expect(convertUnicodeToText('linke the string convert to unicode')).toBe('linke the string convert to unicode');
|
||||
expect(convertUnicodeToText('')).toBe('');
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue