@@ -113,28 +113,28 @@ describe('KeysScanner', () => {
113
113
} ) ;
114
114
} ) ;
115
115
116
- // describe('getNodeTotal', () => {
117
- // it('get total keys in db', async () => {
118
- // expect(await service.getNodeTotal(nodeClient)).toEqual(1);
119
- // });
120
- // it('get total keys in db (db:3)', async () => {
121
- // const client = Object.assign(nodeClient);
122
- // client.options = { db: 3 };
123
- // expect(await service.getNodeTotal(client)).toEqual(100);
124
- // });
125
- // it('get total keys in db (no keyspace data)', async () => {
126
- // when(nodeClient.sendCommand)
127
- // .calledWith(jasmine.objectContaining({ name: 'info' }))
128
- // .mockResolvedValueOnce(mockRedisKeyspaceInfoResponseNoKeyspaceData);
116
+ describe ( 'getNodeTotal' , ( ) => {
117
+ it ( 'get total keys in db' , async ( ) => {
118
+ expect ( await service . getNodeTotal ( nodeClient ) ) . toEqual ( 1 ) ;
119
+ } ) ;
120
+ it ( 'get total keys in db (db:3)' , async ( ) => {
121
+ const client = Object . assign ( nodeClient ) ;
122
+ client . options = { db : 3 } ;
123
+ expect ( await service . getNodeTotal ( client ) ) . toEqual ( 100 ) ;
124
+ } ) ;
125
+ it ( 'get total keys in db (no keyspace data)' , async ( ) => {
126
+ when ( nodeClient . sendCommand )
127
+ . calledWith ( jasmine . objectContaining ( { name : 'info' } ) )
128
+ . mockResolvedValueOnce ( mockRedisKeyspaceInfoResponseNoKeyspaceData ) ;
129
129
130
- // expect(await service.getNodeTotal(nodeClient)).toEqual(0);
131
- // });
132
- // it('get total keys in db (no info data)', async () => {
133
- // when(nodeClient.sendCommand)
134
- // .calledWith(jasmine.objectContaining({ name: 'info' }))
135
- // .mockResolvedValueOnce(mockRedisKeyspaceInfoResponseEmpty);
130
+ expect ( await service . getNodeTotal ( nodeClient ) ) . toEqual ( 0 ) ;
131
+ } ) ;
132
+ it ( 'get total keys in db (no info data)' , async ( ) => {
133
+ when ( nodeClient . sendCommand )
134
+ . calledWith ( jasmine . objectContaining ( { name : 'info' } ) )
135
+ . mockResolvedValueOnce ( mockRedisKeyspaceInfoResponseEmpty ) ;
136
136
137
- // expect(await service.getNodeTotal(nodeClient)).toEqual(0);
138
- // });
139
- // });
137
+ expect ( await service . getNodeTotal ( nodeClient ) ) . toEqual ( 0 ) ;
138
+ } ) ;
139
+ } ) ;
140
140
} ) ;
0 commit comments