mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 13:57:10 -04:00

* feat: add Text to Unicode tool * Update src/tools/text-to-unicode/index.ts --------- Co-authored-by: Corentin THOMASSET <corentin.thomasset74@gmail.com>
20 lines
1.2 KiB
TypeScript
20 lines
1.2 KiB
TypeScript
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('');
|
|
});
|
|
});
|
|
});
|