1 |
|
2 | import { code2uni, uni2code, uni2hex, uni2fsw, uni2swu, fsw2uni, swu2uni } from './';
|
3 |
|
4 |
|
5 | it('should convert unicode code point to uni8 character', () => {
|
6 | expect(code2uni(0x1D800)).toBe('𝠀');
|
7 | })
|
8 |
|
9 | it('should convert uni8 character to unicode code point', () => {
|
10 | expect(uni2code('𝠀')).toBe(0x1D800);
|
11 | })
|
12 |
|
13 | it('should convert uni8 character to hex representation', () => {
|
14 | expect(uni2hex('𝠀')).toBe('1D800');
|
15 | })
|
16 |
|
17 | it('should convert uni8 character to fsw', () => {
|
18 | expect(uni2fsw('𝠀')).toBe('S10000');
|
19 | })
|
20 |
|
21 | it('should convert uni8 character to swu', () => {
|
22 | expect(uni2swu('𝠀')).toBe('');
|
23 | })
|
24 |
|
25 | it('should convert fsw to uni8 character', () => {
|
26 | expect(fsw2uni('S10000')).toBe('𝠀');
|
27 | })
|
28 |
|
29 | it('should convert swu to uni8 character', () => {
|
30 | expect(swu2uni('')).toBe('𝠀');
|
31 | })
|