1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/packages/time-series/lib/commands/DELETERULE.spec.ts
2023-07-05 14:41:38 -04:00

27 lines
785 B
TypeScript

import { strict as assert } from 'assert';
import { TimeSeriesAggregationType } from '.';
import testUtils, { GLOBAL } from '../test-utils';
import DELETERULE from './DELETERULE';
describe('DELETERULE', () => {
it('transformArguments', () => {
assert.deepEqual(
DELETERULE.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);
});