File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
redisinsight/ui/src/utils/tests Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ import {
15
15
MAX_REFRESH_RATE ,
16
16
errorValidateRefreshRateNumber ,
17
17
errorValidateNegativeInteger ,
18
- } from '../validations'
18
+ validateConsumerGroupId
19
+ } from 'uiSrc/utils'
19
20
20
21
const text1 = '123 123 123'
21
22
const text2 = 'lorem lorem12312 lorem'
@@ -248,4 +249,17 @@ describe('Validations utils', () => {
248
249
expect ( result ) . toBe ( expected )
249
250
} )
250
251
} )
252
+
253
+ describe ( 'validateConsumerGroupId' , ( ) => {
254
+ it . each ( [
255
+ [ '123' , '123' ] ,
256
+ [ '123-1' , '123-1' ] ,
257
+ [ '$' , '$' ] ,
258
+ [ '11.zx-1' , '11-1' ] ,
259
+ ] ) ( 'for input: %s (input), should be output: %s' ,
260
+ ( input , expected ) => {
261
+ const result = validateConsumerGroupId ( input )
262
+ expect ( result ) . toBe ( expected )
263
+ } )
264
+ } )
251
265
} )
You can’t perform that action at this time.
0 commit comments