You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-03 04:01:40 +03:00
34 lines
781 B
TypeScript
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);
|
|
});
|