1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Update doctest client with latest v4 release (#2844)

This commit is contained in:
Shaya Potter
2024-09-29 13:19:06 +03:00
committed by GitHub
parent fd7b10be6c
commit 49fdb79897
167 changed files with 8227 additions and 9599 deletions

View File

@@ -57,16 +57,26 @@ describe('ADD', () => {
);
});
it('with RETENTION, ENCODING, CHUNK_SIZE, ON_DUPLICATE, LABELS', () => {
it('with IGNORE', () => {
assert.deepEqual(
transformArguments('key', '*', 1, {
IGNORE: { MAX_TIME_DIFF: 1, MAX_VAL_DIFF: 1}
}),
['TS.ADD', 'key', '*', '1', 'IGNORE', '1', '1']
)
});
it('with RETENTION, ENCODING, CHUNK_SIZE, ON_DUPLICATE, LABELS, IGNORE', () => {
assert.deepEqual(
transformArguments('key', '*', 1, {
RETENTION: 1,
ENCODING: TimeSeriesEncoding.UNCOMPRESSED,
CHUNK_SIZE: 1,
ON_DUPLICATE: TimeSeriesDuplicatePolicies.BLOCK,
LABELS: { label: 'value' }
LABELS: { label: 'value' },
IGNORE: { MAX_TIME_DIFF: 1, MAX_VAL_DIFF: 1}
}),
['TS.ADD', 'key', '*', '1', 'RETENTION', '1', 'ENCODING', 'UNCOMPRESSED', 'CHUNK_SIZE', '1', 'ON_DUPLICATE', 'BLOCK', 'LABELS', 'label', 'value']
['TS.ADD', 'key', '*', '1', 'RETENTION', '1', 'ENCODING', 'UNCOMPRESSED', 'CHUNK_SIZE', '1', 'ON_DUPLICATE', 'BLOCK', 'LABELS', 'label', 'value', 'IGNORE', '1', '1']
);
});
});