Skip to content

Commit 64dd0b3

Browse files
committed
fix info tests and fix setting preserve attribute
1 parent b375570 commit 64dd0b3

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

packages/time-series/lib/commands/INFO.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ import { TIME_SERIES_DUPLICATE_POLICIES } from '.';
33
import testUtils, { GLOBAL } from '../test-utils';
44
import INFO, { InfoReply } from './INFO';
55
import { TIME_SERIES_AGGREGATION_TYPE } from './CREATERULE';
6+
import { parseArgs } from '@redis/client/lib/commands/generic-transformers';
67

78
describe('TS.INFO', () => {
89
it('transformArguments', () => {
910
assert.deepEqual(
10-
INFO.transformArguments('key'),
11+
parseArgs(INFO, 'key'),
1112
['TS.INFO', 'key']
1213
);
1314
});
@@ -23,7 +24,7 @@ describe('TS.INFO', () => {
2324
client.ts.add('key', 1, 10)
2425
]);
2526

26-
assertInfo(await client.ts.info('key'));
27+
assertInfo(await client.ts.info('key') as any);
2728
}, GLOBAL.SERVERS.OPEN);
2829
});
2930

packages/time-series/lib/commands/INFO_DEBUG.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import testUtils, { GLOBAL } from '../test-utils';
44
import { assertInfo } from './INFO.spec';
55
import INFO_DEBUG from './INFO_DEBUG';
66
import { TIME_SERIES_AGGREGATION_TYPE } from './CREATERULE';
7+
import { parseArgs } from '@redis/client/lib/commands/generic-transformers';
78

89
describe('TS.INFO_DEBUG', () => {
910
it('transformArguments', () => {
1011
assert.deepEqual(
11-
INFO_DEBUG.transformArguments('key'),
12+
parseArgs(INFO_DEBUG, 'key'),
1213
['TS.INFO', 'key', 'DEBUG']
1314
);
1415
});
@@ -25,7 +26,7 @@ describe('TS.INFO_DEBUG', () => {
2526
]);
2627

2728
const infoDebug = await client.ts.infoDebug('key');
28-
assertInfo(infoDebug);
29+
assertInfo(infoDebug as any);
2930
assert.equal(typeof infoDebug.keySelfName, 'string');
3031
assert.ok(Array.isArray(infoDebug.chunks));
3132
for (const chunk of infoDebug.chunks) {

packages/time-series/lib/commands/MRANGE.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function parseGroupByArgument(parser: CommandParser, groupBy?: TsMRangeOp
3636
groupBy.reducer
3737
);
3838

39-
parser.preserve = true;
39+
parser.setPreserve(true);
4040
}
4141
}
4242

0 commit comments

Comments
 (0)