@@ -4,30 +4,45 @@ import { isRediStack } from 'uiSrc/utils'
4
4
const unmapWithName = ( arr : any [ ] ) => arr . map ( ( item ) => ( { name : item } ) )
5
5
6
6
const isRediStackTests = [
7
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' , 'custom' ] ) , '6.2.6' ] , expected : false } ,
8
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'graph' , 'custom' ] ) , '6.2.6' ] , expected : false } ,
9
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' ] ) , '6.2.6' ] , expected : true } ,
10
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' ] ) ] , expected : true } ,
7
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' ] ) , '6.2.5' ] , expected : true } ,
8
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' ] ) , '6.2.5' ] , expected : true } ,
9
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'searchlight' ] ) , '6.2.5' ] , expected : false } ,
10
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' ] ) , '6.2.5' ] , expected : true } ,
11
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'graph' ] ) , '6.2.5' ] , expected : true } ,
12
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'redisgears' ] ) , '6.2.5' ] , expected : true } ,
13
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'redisgears' ] ) , '6.2.5' ] , expected : true } ,
14
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'redisgears_2' ] ) , '6.2.5' ] , expected : true } ,
15
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'redisgears_2' ] ) , '6.2.5' ] , expected : true } ,
16
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'search' , 'redisgears_2' ] ) , '6.2.5' ] , expected : false } ,
17
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' , 'redisgears_2' ] ) , '6.2.5' ] , expected : false } ,
18
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'graph' , 'redisgears_2' ] ) , '6.2.5' ] , expected : false } ,
19
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' , 'redisgears' ] ) , '6.2.5' ] , expected : false } ,
20
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'graph' , 'redisgears' ] ) , '6.2.5' ] , expected : false } ,
21
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'graph' , 'redisgears' , 'redisgears_2' ] ) , '6.2.5' ] , expected : false } ,
22
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'custom' ] ) , '6.2.5' ] , expected : false } ,
23
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' , 'custom' ] ) , '6.2.5' ] , expected : false } ,
24
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' , 'redisgears' , 'custom' ] ) , '6.2.5' ] , expected : false } ,
25
+
26
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' ] ) , null ] , expected : true } ,
27
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' ] ) , null ] , expected : true } ,
28
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'searchlight' ] ) , null ] , expected : false } ,
11
29
{ input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' ] ) , null ] , expected : true } ,
12
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' ] ) , null ] , expected : false } ,
13
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'rg' , 'search' ] ) ] , expected : false } ,
14
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'graph' ] ) , '6.2.6' ] , expected : true } ,
15
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' ] ) , '6.2.5' ] , expected : false } ,
16
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'graph' ] ) , '6.2.5' ] , expected : false } ,
17
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' ] ) , '7.1' ] , expected : false } ,
18
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'graph' ] ) , '7.1' ] , expected : false } ,
19
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'redisgears' , 'searchlight' ] ) , '7.1' ] , expected : true } ,
20
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'redisgears' , 'search' ] ) , '7.1' ] , expected : true } ,
21
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'redisgears_2' , 'searchlight' ] ) , '7.1' ] , expected : true } ,
22
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'redisgears_2' , 'search' ] ) , '7.1' ] , expected : true } ,
23
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'rg' , 'searchlight' ] ) , '7.1' ] , expected : false } ,
24
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'rg' , 'search' ] ) , '7.1' ] , expected : false } ,
25
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'redisgears_2' , 'redisgears' , 'search' ] ) , '7.1' ] , expected : false } ,
26
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' ] ) , '7.1' ] , expected : true } ,
27
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' ] ) , '7.1' ] , expected : true } ,
28
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' ] ) , '7.1' ] , expected : true } ,
29
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'custom' ] ) , '7.1' ] , expected : false } ,
30
- { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'seasearchlightrch' , 'custom' ] ) , '7.1' ] , expected : false } ,
30
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'graph' ] ) , null ] , expected : true } ,
31
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'redisgears' ] ) , null ] , expected : true } ,
32
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'redisgears' ] ) , null ] , expected : true } ,
33
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'redisgears_2' ] ) , null ] , expected : true } ,
34
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'redisgears_2' ] ) , null ] , expected : true } ,
35
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'search' , 'redisgears_2' ] ) , null ] , expected : false } ,
36
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' , 'redisgears_2' ] ) , null ] , expected : false } ,
37
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'graph' , 'redisgears_2' ] ) , null ] , expected : false } ,
38
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' , 'redisgears' ] ) , null ] , expected : false } ,
39
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'graph' , 'redisgears' ] ) , null ] , expected : false } ,
40
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'search' , 'graph' , 'redisgears' , 'redisgears_2' ] ) , null ] , expected : false } ,
41
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'custom' ] ) , null ] , expected : false } ,
42
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' , 'custom' ] ) , null ] , expected : false } ,
43
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' , 'graph' , 'redisgears' , 'custom' ] ) , null ] , expected : false } ,
44
+
45
+ { input : [ unmapWithName ( [ 'bf' , 'timeseries' , 'ReJSON' , 'searchlight' ] ) , '6.2.4' ] , expected : false } ,
31
46
]
32
47
33
48
describe ( 'isRediStack' , ( ) => {
0 commit comments