You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
fix GET spec
This commit is contained in:
@@ -1,33 +1,22 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import RedisClient from '../client';
|
|
||||||
import testUtils, { GLOBAL } from '../test-utils';
|
import testUtils, { GLOBAL } from '../test-utils';
|
||||||
import { transformArguments } from './GET';
|
import GET from './GET';
|
||||||
|
|
||||||
describe('GET', () => {
|
describe('GET', () => {
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key'),
|
GET.transformArguments('key'),
|
||||||
['GET', 'key']
|
['GET', 'key']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
testUtils.testWithClient('client.get', async client => {
|
testUtils.testAll('get', async client => {
|
||||||
const a = await client.get(
|
assert.equal(
|
||||||
'key'
|
await client.get('key'),
|
||||||
);
|
null
|
||||||
|
);
|
||||||
|
}, {
|
||||||
|
client: GLOBAL.SERVERS.OPEN,
|
||||||
assert.equal(
|
cluster: GLOBAL.CLUSTERS.OPEN
|
||||||
await client.get('key'),
|
});
|
||||||
null
|
|
||||||
);
|
|
||||||
}, GLOBAL.SERVERS.OPEN);
|
|
||||||
|
|
||||||
testUtils.testWithCluster('cluster.get', async cluster => {
|
|
||||||
assert.equal(
|
|
||||||
await cluster.get('key'),
|
|
||||||
null
|
|
||||||
);
|
|
||||||
}, GLOBAL.CLUSTERS.OPEN);
|
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user