diff options
author | 2024-01-31 16:55:18 +0700 | |
---|---|---|
committer | 2024-01-31 09:55:18 +0000 | |
commit | c46207f1bb9fcd0691898be63bd20dfb5164de4b (patch) | |
tree | 5dcd90771eefeee5a9a1310e0a6f7b21095db920 /src/tools/text-to-unicode/text-to-unicode.service.test.ts | |
parent | 670f735501b5830ad31af52ef7cdaa17e9e51bab (diff) | |
download | it-tools-c46207f1bb9fcd0691898be63bd20dfb5164de4b.tar.gz it-tools-c46207f1bb9fcd0691898be63bd20dfb5164de4b.tar.zst it-tools-c46207f1bb9fcd0691898be63bd20dfb5164de4b.zip |
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>
Diffstat (limited to 'src/tools/text-to-unicode/text-to-unicode.service.test.ts')
-rw-r--r-- | src/tools/text-to-unicode/text-to-unicode.service.test.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tools/text-to-unicode/text-to-unicode.service.test.ts b/src/tools/text-to-unicode/text-to-unicode.service.test.ts new file mode 100644 index 0000000..bda4fa7 --- /dev/null +++ b/src/tools/text-to-unicode/text-to-unicode.service.test.ts @@ -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(''); + }); + }); +}); |