MCPcopy
hub / github.com/redis/node-redis / createAndSubscribe

Function createAndSubscribe

packages/client/lib/client/pub-sub.spec.ts:11–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9
10 describe('subscribe to new channel', () => {
11 function createAndSubscribe() {
12 const pubSub = new PubSub(CLIENT_ID),
13 command = pubSub.subscribe(TYPE, CHANNEL, LISTENER);
14
15 assert.equal(pubSub.isActive, true);
16 assert.ok(command);
17 assert.equal(command.channelsCounter, 1);
18
19 return {
20 pubSub,
21 command
22 };
23 }
24
25 it('resolve', () => {
26 const { pubSub, command } = createAndSubscribe();

Callers 1

pub-sub.spec.tsFile · 0.85

Calls 1

subscribeMethod · 0.95

Tested by

no test coverage detected