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
701 B
TypeScript
23 lines
701 B
TypeScript
import { strict as assert } from 'assert';
|
|
import testUtils, { GLOBAL } from '../test-utils';
|
|
|
|
describe('GET_BUFFER', () => {
|
|
testUtils.testWithClient('client.getBuffer', async client => {
|
|
const buffer = Buffer.from('string');
|
|
await client.set('key', buffer);
|
|
assert.deepEqual(
|
|
buffer,
|
|
await client.getBuffer('key')
|
|
);
|
|
}, GLOBAL.SERVERS.OPEN);
|
|
|
|
testUtils.testWithCluster('cluster.getBuffer', async cluster => {
|
|
const buffer = Buffer.from('string');
|
|
await cluster.set('key', buffer);
|
|
assert.deepEqual(
|
|
buffer,
|
|
await cluster.getBuffer('key')
|
|
);
|
|
}, GLOBAL.CLUSTERS.OPEN);
|
|
});
|