Skip to content

Commit 5d538b8

Browse files
authored
Merge pull request #19 from RedisInsight/feature/fix-eslint-errors
auto-fix eslint ui errors
2 parents 188be27 + 17d428a commit 5d538b8

37 files changed

+3500
-3534
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ignores folders covered with custom linters configs
22
redisinsight/api
3-
tests
3+
tests/e2e
44

55
# Logs
66
logs

redisinsight/ui/src/packages/redisearch/src/utils/tests/parseResponse.spec.ts

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { parseSearchRawResponse, parseInfoRawResponse, parseAggregateRawResponse } from '../';
1+
import { parseSearchRawResponse, parseInfoRawResponse, parseAggregateRawResponse } from '..'
22

33
const resultFTSearch: any[] = [
44
'red:2',
@@ -23,27 +23,27 @@ const resultFTSearch: any[] = [
2323
'visits',
2424
'108',
2525
],
26-
];
26+
]
2727

28-
const resultFTSearchNoContent: any[] = ['red:2', 'red:3', 'red:4', 'red:5', 'red:6'];
28+
const resultFTSearchNoContent: any[] = ['red:2', 'red:3', 'red:4', 'red:5', 'red:6']
2929

3030
describe('parseSearchRawResponse', () => {
3131
it('command "get" should return result is not modified 1', () => {
32-
const command = 'get';
33-
const result: any[] = [];
32+
const command = 'get'
33+
const result: any[] = []
3434

35-
expect(parseSearchRawResponse(command, result)).toEqual(result);
36-
});
35+
expect(parseSearchRawResponse(command, result)).toEqual(result)
36+
})
3737

3838
it('command "get" should return result is not modified 2', () => {
39-
const command = 'get';
39+
const command = 'get'
4040
const result: any = []
4141

42-
expect(parseSearchRawResponse(command, result)).toEqual(result);
43-
});
42+
expect(parseSearchRawResponse(command, result)).toEqual(result)
43+
})
4444

4545
it('command "ft.search" should return array with parsed object', () => {
46-
const command = 'ft.search';
46+
const command = 'ft.search'
4747
const parsedResultFTSearch = [
4848
{
4949
Doc: 'red:2',
@@ -59,13 +59,13 @@ describe('parseSearchRawResponse', () => {
5959
url: '<https://redis.com/primary-caching>',
6060
visits: '108',
6161
},
62-
];
62+
]
6363

64-
expect(parseSearchRawResponse(command, resultFTSearch)).toEqual(parsedResultFTSearch);
65-
});
64+
expect(parseSearchRawResponse(command, resultFTSearch)).toEqual(parsedResultFTSearch)
65+
})
6666

6767
it('command "ft.search" with attr NOCONTENT should return array of doc names', () => {
68-
const command = 'ft.search NOCONTENT';
68+
const command = 'ft.search NOCONTENT'
6969
const parsedResultFTSearch = [
7070
{
7171
Doc: 'red:2',
@@ -82,19 +82,17 @@ describe('parseSearchRawResponse', () => {
8282
{
8383
Doc: 'red:6',
8484
},
85-
];
85+
]
8686

87-
expect(parseSearchRawResponse(command, resultFTSearchNoContent)).toEqual(parsedResultFTSearch);
88-
});
89-
90-
91-
});
87+
expect(parseSearchRawResponse(command, resultFTSearchNoContent)).toEqual(parsedResultFTSearch)
88+
})
89+
})
9290

9391
describe('parseAggregateRawResponse', () => {
9492
it('command "ft.aggregate" should return array of array with objects count of docs ', () => {
95-
const command = 'ft.aggregate';
96-
const resultFTAggregate = [[], [], [], [], []];
93+
const command = 'ft.aggregate'
94+
const resultFTAggregate = [[], [], [], [], []]
9795

98-
expect(parseAggregateRawResponse(resultFTAggregate)).toEqual(resultFTAggregate);
99-
});
100-
});
96+
expect(parseAggregateRawResponse(resultFTAggregate)).toEqual(resultFTAggregate)
97+
})
98+
})

0 commit comments

Comments
 (0)