Skip to content

Commit 9355531

Browse files
committed
remove unit group for ui unit tests
1 parent 347440a commit 9355531

36 files changed

+23
-735
lines changed

redisinsight/ui/src/components/navigation-menu/NavigationMenu.spec.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ jest.mock('uiSrc/slices/app/info', () => ({
2424
}))
2525

2626
describe('NavigationMenu', () => {
27-
/**
28-
* without connectedInstance tests
29-
*
30-
* @group unit
31-
*/
3227
describe('without connectedInstance', () => {
3328
it('should render', () => {
3429
(appInfoSelector as jest.Mock).mockImplementation(() => ({

redisinsight/ui/src/pages/browser/components/rejson-details/JSONUtils/JSONUtils.spec.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import { generatePath, isScalar } from './JSONUtils'
22

33
describe('JSONUtils', () => {
4-
/**
5-
* generatePath tests
6-
*
7-
* @group unit
8-
*/
94
describe('generatePath', () => {
105
it('should generate path for Parent and Children', () => {
116
const expectPath = "['parent']['children']"

redisinsight/ui/src/slices/tests/analytics/clusterDetails.spec.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ beforeEach(() => {
2525
})
2626

2727
describe('clusterDetails slice', () => {
28-
/**
29-
* reducer, actions and selectors tests
30-
*
31-
* @group unit
32-
*/
3328
describe('reducer, actions and selectors', () => {
3429
it('should return the initial state on first run', () => {
3530
// Arrange
@@ -122,17 +117,8 @@ describe('clusterDetails slice', () => {
122117
})
123118

124119
// thunks
125-
/**
126-
* thunks tests
127-
*
128-
* @group unit
129-
*/
120+
130121
describe('thunks', () => {
131-
/**
132-
* fetchClusterDetailsAction tests
133-
*
134-
* @group unit
135-
*/
136122
describe('fetchClusterDetailsAction', () => {
137123
it('succeed to fetch data', async () => {
138124
// Act

redisinsight/ui/src/slices/tests/analytics/settings.spec.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ import reducer, {
88
} from '../../analytics/settings'
99

1010
describe('analytics settings slice', () => {
11-
/**
12-
* reducer, actions and selectors tests
13-
*
14-
* @group unit
15-
*/
1611
describe('reducer, actions and selectors', () => {
1712
it('should return the initial state on first run', () => {
1813
// Arrange

redisinsight/ui/src/slices/tests/analytics/slowlog.spec.ts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -272,17 +272,8 @@ describe('slowLog slice', () => {
272272
})
273273

274274
// thunks
275-
/**
276-
* thunks tests
277-
*
278-
* @group unit
279-
*/
275+
280276
describe('thunks', () => {
281-
/**
282-
* fetchSlowLogsAction tests
283-
*
284-
* @group unit
285-
*/
286277
describe('fetchSlowLogsAction', () => {
287278
it('succeed to fetch data', async () => {
288279
// Arrange
@@ -336,11 +327,6 @@ describe('slowLog slice', () => {
336327
})
337328
})
338329

339-
/**
340-
* clearSlowLogAction tests
341-
*
342-
* @group unit
343-
*/
344330
describe('clearSlowLogAction', () => {
345331
it('succeed to fetch data', async () => {
346332
const responsePayload = { status: 200 }
@@ -384,11 +370,6 @@ describe('slowLog slice', () => {
384370
})
385371
})
386372

387-
/**
388-
* getSlowLogConfigAction tests
389-
*
390-
* @group unit
391-
*/
392373
describe('getSlowLogConfigAction', () => {
393374
it('succeed to fetch data', async () => {
394375
const data = {
@@ -436,11 +417,6 @@ describe('slowLog slice', () => {
436417
})
437418
})
438419

439-
/**
440-
* patchSlowLogConfigAction tests
441-
*
442-
* @group unit
443-
*/
444420
describe('patchSlowLogConfigAction', () => {
445421
it('succeed to fetch data', async () => {
446422
const data = {

redisinsight/ui/src/slices/tests/app/context.spec.ts

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ beforeEach(() => {
4646
})
4747

4848
describe('slices', () => {
49-
/**
50-
* setAppContextInitialState tests
51-
*
52-
* @group unit
53-
*/
5449
describe('setAppContextInitialState', () => {
5550
it('should properly set initial state', () => {
5651
const nextState = reducer(initialState, setAppContextInitialState())
@@ -329,11 +324,7 @@ describe('slices', () => {
329324
expect(appContextSelector(rootState)).toEqual(state)
330325
})
331326
})
332-
/**
333-
* setBrowserTreeNodesOpen tests
334-
*
335-
* @group unit
336-
*/
327+
337328
describe('setBrowserTreeNodesOpen', () => {
338329
it('should properly set open nodes in the tree', () => {
339330
// Arrange
@@ -368,11 +359,7 @@ describe('slices', () => {
368359
expect(appContextBrowserTree(rootState)).toEqual(state)
369360
})
370361
})
371-
/**
372-
* setBrowserTreeSelectedLeaf tests
373-
*
374-
* @group unit
375-
*/
362+
376363
describe('setBrowserTreeSelectedLeaf', () => {
377364
it('should properly set selected keys in the tree', () => {
378365
// Arrange
@@ -414,11 +401,7 @@ describe('slices', () => {
414401
expect(appContextBrowserTree(rootState)).toEqual(state)
415402
})
416403
})
417-
/**
418-
* setBrowserTreePanelSizes tests
419-
*
420-
* @group unit
421-
*/
404+
422405
describe('setBrowserTreePanelSizes', () => {
423406
it('should properly set browser tree panel widths', () => {
424407
// Arrange
@@ -442,11 +425,7 @@ describe('slices', () => {
442425
expect(appContextBrowserTree(rootState)).toEqual(state)
443426
})
444427
})
445-
/**
446-
* setBrowserTreeDelimiter tests
447-
*
448-
* @group unit
449-
*/
428+
450429
describe('setBrowserTreeDelimiter', () => {
451430
it('should properly set browser tree delimiter', () => {
452431
// Arrange
@@ -468,11 +447,7 @@ describe('slices', () => {
468447
expect(appContextBrowserTree(rootState)).toEqual(state)
469448
})
470449
})
471-
/**
472-
* resetBrowserTree tests
473-
*
474-
* @group unit
475-
*/
450+
476451
describe('resetBrowserTree', () => {
477452
it('should properly set last page', () => {
478453
// Arrange

redisinsight/ui/src/slices/tests/app/info.spec.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ beforeEach(() => {
3232
})
3333

3434
describe('slices', () => {
35-
/**
36-
* reducer, actions and selectors tests
37-
*
38-
* @group unit
39-
*/
4035
describe('reducer, actions and selectors', () => {
4136
it('should return the initial state on first run', () => {
4237
// Arrange
@@ -189,11 +184,7 @@ describe('slices', () => {
189184
})
190185

191186
// thunks
192-
/**
193-
* fetchServerInfo tests
194-
*
195-
* @group unit
196-
*/
187+
197188
describe('fetchServerInfo', () => {
198189
it('succeed to fetch server info', async () => {
199190
// Act

redisinsight/ui/src/slices/tests/app/notifications.spec.ts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ const notificationsResponse: any = {
6969
}
7070

7171
describe('slices', () => {
72-
/**
73-
* reducer, actions and selectors tests
74-
*
75-
* @group unit
76-
*/
7772
describe('reducer, actions and selectors', () => {
7873
it('should return the initial state on first run', () => {
7974
// Arrange
@@ -410,17 +405,8 @@ describe('slices', () => {
410405
})
411406

412407
// thunks
413-
/**
414-
* thunks tests
415-
*
416-
* @group unit
417-
*/
408+
418409
describe('thunks', () => {
419-
/**
420-
* fetchNotificationsAction tests
421-
*
422-
* @group unit
423-
*/
424410
describe('fetchNotificationsAction', () => {
425411
it('succeed to fetch data', async () => {
426412
// Arrange
@@ -465,11 +451,6 @@ describe('slices', () => {
465451
})
466452
})
467453

468-
/**
469-
* unreadNotificationsAction tests
470-
*
471-
* @group unit
472-
*/
473454
describe('unreadNotificationsAction', () => {
474455
it('succeed to fetch data', async () => {
475456
// Arrange
@@ -490,11 +471,6 @@ describe('slices', () => {
490471
})
491472
})
492473

493-
/**
494-
* setNewNotificationAction tests
495-
*
496-
* @group unit
497-
*/
498474
describe('setNewNotificationAction', () => {
499475
it('succeed to update notificationsCenter', () => {
500476
const data = notificationsResponse

redisinsight/ui/src/slices/tests/app/plugins.spec.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ const MOCK_PLUGINS_RESPONSE = {
4343
}
4444

4545
describe('slices', () => {
46-
/**
47-
* reducer, actions and selectors tests
48-
*
49-
* @group unit
50-
*/
5146
describe('reducer, actions and selectors', () => {
5247
it('should return the initial state on first run', () => {
5348
// Arrange

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ beforeEach(() => {
1919
})
2020

2121
describe('slices', () => {
22-
/**
23-
* reducer, actions and selectors tests
24-
*
25-
* @group unit
26-
*/
2722
describe('reducer, actions and selectors', () => {
2823
it('should return the initial state on first run', () => {
2924
// Arrange
@@ -105,11 +100,7 @@ describe('slices', () => {
105100
})
106101

107102
// thunks
108-
/**
109-
* fetchRedisCommandsInfo tests
110-
*
111-
* @group unit
112-
*/
103+
113104
describe('fetchRedisCommandsInfo', () => {
114105
it('succeed to fetch redis commands', async () => {
115106
// Arrange

0 commit comments

Comments
 (0)