1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/packages/bloom/lib/commands/t-digest/TRIMMED_MEAN.spec.ts
2023-09-18 15:03:07 -04:00

22 lines
627 B
TypeScript

import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils';
import TRIMMED_MEAN from './TRIMMED_MEAN';
describe('TDIGEST.TRIMMED_MEAN', () => {
it('transformArguments', () => {
assert.deepEqual(
TRIMMED_MEAN.transformArguments('key', 0, 1),
['TDIGEST.TRIMMED_MEAN', 'key', '0', '1']
);
});
testUtils.testWithClient('client.tDigest.trimmedMean', async client => {
const [, reply] = await Promise.all([
client.tDigest.create('key'),
client.tDigest.trimmedMean('key', 0, 1)
]);
assert.equal(reply, NaN);
}, GLOBAL.SERVERS.OPEN);
});