Browse Source

add miss retrun type

Paul 5 years ago
parent
commit
dd3d30c8c3
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      test/utils.test.ts

+ 5
- 5
test/utils.test.ts View File

1
 import { Utils } from '../src/utils';
1
 import { Utils } from '../src/utils';
2
 
2
 
3
-test('utils crc32', () => {
3
+test('utils crc32', (): void => {
4
   const v = Utils.crc32('/v1/session/init');
4
   const v = Utils.crc32('/v1/session/init');
5
   expect(v).toBe(1897767088);
5
   expect(v).toBe(1897767088);
6
 });
6
 });
7
 
7
 
8
-test('utils str2ab and ab2str', () => {
8
+test('utils str2ab and ab2str', (): void => {
9
   expect(Utils.ab2str(Utils.str2ab('test'))).toBe('test');
9
   expect(Utils.ab2str(Utils.str2ab('test'))).toBe('test');
10
 });
10
 });
11
 
11
 
12
-test('utils encrypt and decrypt', () => {
12
+test('utils encrypt and decrypt', (): void => {
13
   const key = 'b8ca9aa66def05ff3f24919274bb4a66';
13
   const key = 'b8ca9aa66def05ff3f24919274bb4a66';
14
   const iv = key;
14
   const iv = key;
15
   expect(Utils.decrypt(Utils.encrypt('test', key, iv), key, iv)).toBe('test');
15
   expect(Utils.decrypt(Utils.encrypt('test', key, iv), key, iv)).toBe('test');
16
 });
16
 });
17
 
17
 
18
-test('utils binToBase64 and base64ToBin', () => {
18
+test('utils binToBase64 and base64ToBin', (): void => {
19
   expect(Utils.binToBase64(Utils.base64ToBin('test'))).toBe('test');
19
   expect(Utils.binToBase64(Utils.base64ToBin('test'))).toBe('test');
20
 });
20
 });
21
 
21
 
22
-test('utils stringToBin and binToString', () => {
22
+test('utils stringToBin and binToString', (): void => {
23
   expect(Utils.binToString(Utils.stringToBin('test'))).toBe('test');
23
   expect(Utils.binToString(Utils.stringToBin('test'))).toBe('test');
24
 });
24
 });