Live query pubsub adapter (#2902)
* Moves LiveQuery pub/sub to adapter folder * Adds ability to provide custom adapter for LiveQuery pubsub * Adds test for function based adapter * Pass all options to createSubscriber * nits
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var RedisPubSub = require('../src/LiveQuery/RedisPubSub').RedisPubSub;
|
||||
var RedisPubSub = require('../src/Adapters/PubSub/RedisPubSub').RedisPubSub;
|
||||
|
||||
describe('RedisPubSub', function() {
|
||||
|
||||
@@ -10,14 +10,14 @@ describe('RedisPubSub', function() {
|
||||
});
|
||||
|
||||
it('can create publisher', function() {
|
||||
var publisher = RedisPubSub.createPublisher('redisAddress');
|
||||
var publisher = RedisPubSub.createPublisher({redisURL: 'redisAddress'});
|
||||
|
||||
var redis = require('redis');
|
||||
expect(redis.createClient).toHaveBeenCalledWith('redisAddress', { no_ready_check: true });
|
||||
});
|
||||
|
||||
it('can create subscriber', function() {
|
||||
var subscriber = RedisPubSub.createSubscriber('redisAddress');
|
||||
var subscriber = RedisPubSub.createSubscriber({redisURL: 'redisAddress'});
|
||||
|
||||
var redis = require('redis');
|
||||
expect(redis.createClient).toHaveBeenCalledWith('redisAddress', { no_ready_check: true });
|
||||
|
||||
Reference in New Issue
Block a user