1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-13 10:02:24 +03:00
Files
node-redis/lib/commands/PUBLISH.spec.ts
leibale b3eeb41f58 PubSub
2021-06-09 13:06:09 -04:00

20 lines
558 B
TypeScript

import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient } from '../test-utils';
import { transformArguments } from './PUBLISH';
describe('PUBLISH', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('channel', 'message'),
['PUBLISH', 'channel', 'message']
);
});
itWithClient(TestRedisServers.OPEN, 'client.publish', async client => {
assert.equal(
await client.publish('channel', 'message'),
0
);
});
});