Skip to content

Collection of handy online tools for developers, with great UX.

1.2 KB
Raw Blame
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('');
    });
  });
});