@@ -1,7 +1,6 @@
|
||||
const RedisPubSub = require('../lib/Adapters/PubSub/RedisPubSub').RedisPubSub;
|
||||
|
||||
describe('RedisPubSub', function() {
|
||||
|
||||
beforeEach(function(done) {
|
||||
// Mock redis
|
||||
const createClient = jasmine.createSpy('createClient');
|
||||
@@ -10,17 +9,21 @@ describe('RedisPubSub', function() {
|
||||
});
|
||||
|
||||
it('can create publisher', function() {
|
||||
RedisPubSub.createPublisher({redisURL: 'redisAddress'});
|
||||
RedisPubSub.createPublisher({ redisURL: 'redisAddress' });
|
||||
|
||||
const redis = require('redis');
|
||||
expect(redis.createClient).toHaveBeenCalledWith('redisAddress', { no_ready_check: true });
|
||||
expect(redis.createClient).toHaveBeenCalledWith('redisAddress', {
|
||||
no_ready_check: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('can create subscriber', function() {
|
||||
RedisPubSub.createSubscriber({redisURL: 'redisAddress'});
|
||||
RedisPubSub.createSubscriber({ redisURL: 'redisAddress' });
|
||||
|
||||
const redis = require('redis');
|
||||
expect(redis.createClient).toHaveBeenCalledWith('redisAddress', { no_ready_check: true });
|
||||
expect(redis.createClient).toHaveBeenCalledWith('redisAddress', {
|
||||
no_ready_check: true,
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
|
||||
Reference in New Issue
Block a user