Skip to content

Commit 6059224

Browse files
author
Roman.Sergeenko
committed
#RI-2063 - fix ui tests
1 parent 3ab3cb2 commit 6059224

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

redisinsight/ui/src/slices/tests/app/redis-commands.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { cloneDeep } from 'lodash'
1+
import { cloneDeep, uniqBy } from 'lodash'
22
import { cleanup, initialStateDefault, mockedStore, } from 'uiSrc/utils/test-utils'
33
import { apiService } from 'uiSrc/services'
4-
import { MOCK_COMMANDS_SPEC } from 'uiSrc/constants'
4+
import { ICommand, MOCK_COMMANDS_SPEC } from 'uiSrc/constants'
55
import reducer, {
66
initialState,
77
getRedisCommands,
@@ -60,7 +60,9 @@ describe('slices', () => {
6060
const state = {
6161
...initialState,
6262
spec: data,
63-
commandsArray: Object.keys(data).sort()
63+
commandsArray: Object.keys(data).sort(),
64+
commandGroups: uniqBy(Object.values(data), 'group')
65+
.map((item: ICommand) => item.group)
6466
}
6567

6668
// Act

0 commit comments

Comments
 (0)