You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-03 04:01:40 +03:00
* Adds the start of a timeseries example. * Exports required TimeSeries items. * Fixed import. * Added TS.INFO example output. * Fixed typo. * Fixed typo. * Exported aggregation enum. * Working time series example. Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
27 lines
860 B
TypeScript
27 lines
860 B
TypeScript
import { strict as assert } from 'assert';
|
|
import { TimeSeriesAggregationType } from '.';
|
|
import testUtils, { GLOBAL } from '../test-utils';
|
|
import { transformArguments } from './DELETERULE';
|
|
|
|
describe('DELETERULE', () => {
|
|
it('transformArguments', () => {
|
|
assert.deepEqual(
|
|
transformArguments('source', 'destination'),
|
|
['TS.DELETERULE', 'source', 'destination']
|
|
);
|
|
});
|
|
|
|
testUtils.testWithClient('client.ts.deleteRule', async client => {
|
|
await Promise.all([
|
|
client.ts.create('source'),
|
|
client.ts.create('destination'),
|
|
client.ts.createRule('source', 'destination', TimeSeriesAggregationType.AVERAGE, 1)
|
|
]);
|
|
|
|
assert.equal(
|
|
await client.ts.deleteRule('source', 'destination'),
|
|
'OK'
|
|
);
|
|
}, GLOBAL.SERVERS.OPEN);
|
|
});
|