You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-10 11:43:01 +03:00
23 lines
728 B
TypeScript
23 lines
728 B
TypeScript
import { strict as assert } from 'assert';
|
|
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils';
|
|
|
|
describe('GET_BUFFER', () => {
|
|
itWithClient(TestRedisServers.OPEN, 'client.getBuffer', async client => {
|
|
const buffer = Buffer.from('string');
|
|
await client.set('key', buffer);
|
|
assert.deepEqual(
|
|
buffer,
|
|
await client.getBuffer('key')
|
|
);
|
|
});
|
|
|
|
itWithCluster(TestRedisClusters.OPEN, 'cluster.getBuffer', async cluster => {
|
|
const buffer = Buffer.from('string');
|
|
await cluster.set('key', buffer);
|
|
assert.deepEqual(
|
|
buffer,
|
|
await cluster.getBuffer('key')
|
|
);
|
|
});
|
|
});
|