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/GET.spec.ts
2021-12-20 14:47:51 -05:00

34 lines
781 B
TypeScript

import { strict as assert } from 'assert';
import RedisClient from '../client';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './GET';
describe('GET', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key'),
['GET', 'key']
);
});
testUtils.testWithClient('client.get', async client => {
const a = await client.get(
'key'
);
assert.equal(
await client.get('key'),
null
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testWithCluster('cluster.get', async cluster => {
assert.equal(
await cluster.get('key'),
null
);
}, GLOBAL.CLUSTERS.OPEN);
});