1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-03 04:01:40 +03:00
Files
node-redis/packages/client/lib/commands/EXISTS.spec.ts
Leibale Eidelman d34cb9c07b fix #1819 - fix EXISTS reply (#1820)
* fix #1819 - fix EXISTS reply

* fix for f3f946fd9a - "fix" tests
2022-01-11 11:45:50 -05:00

29 lines
739 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './EXISTS';
describe('EXISTS', () => {
describe('transformArguments', () => {
it('string', () => {
assert.deepEqual(
transformArguments('key'),
['EXISTS', 'key']
);
});
it('array', () => {
assert.deepEqual(
transformArguments(['1', '2']),
['EXISTS', '1', '2']
);
});
});
testUtils.testWithClient('client.exists', async client => {
assert.equal(
await client.exists('key'),
0
);
}, GLOBAL.SERVERS.OPEN);
});