Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 28 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | import expect from 'expect'; |
||
2 | import { keyGenerator, keyFromObject } from './../../src/util/keyGenerator'; |
||
3 | |||
4 | describe('keyGenerator utility function', () => { |
||
5 | const keywords1 = ['keyword', 'keywordA', 'keywordB']; |
||
6 | const keywords2 = ['react', 'redux', 'grid', 'test']; |
||
7 | |||
8 | expect(keyGenerator(keywords1)).toEqual('a2V5d29yZCxrZXl3b3JkQSxrZXl3b3JkQg=='); |
||
9 | expect(keyGenerator(keywords2)).toEqual('cmVhY3QscmVkdXgsZ3JpZCx0ZXN0'); |
||
10 | }); |
||
11 | |||
12 | describe('keyFromObject utility function', () => { |
||
13 | const keywords1 = { |
||
14 | someKey: 'someKey', |
||
15 | anotherKey: 'anotherKey' |
||
16 | }; |
||
17 | |||
18 | const keywords2 = { |
||
19 | react: 'react', |
||
20 | redux: 'redux', |
||
21 | grid: 'grid', |
||
22 | test: 'test' |
||
23 | }; |
||
24 | |||
25 | expect(keyFromObject(keywords1)).toEqual('c29tZUtleWFub3RoZXJLZXk='); |
||
26 | expect(keyFromObject(keywords2)).toEqual('cmVhY3RyZWR1eGdyaWR0ZXN0'); |
||
27 | |||
28 | }); |