All files / src index.js

100% Statements 14/14
83.33% Branches 5/6
100% Functions 3/3
100% Lines 11/11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  1x 1x   1x 1x     216x 72x     72x 72x 72x 72x   72x      
 
import BaseReplicator from './commons/base-replicator';
import RealtimeEngine from './realtime-engine';
 
import makeDebug from 'debug';
const debug = makeDebug('realtime-replicator');
 
export default class RealtimeReplicator extends BaseReplicator {
  constructor (service, options = {}) {
    debug('constructor started');
    super(service, options);
 
    const engine = this.engine = new RealtimeEngine(service, options);
    this.changeSort = (...args) => engine.changeSort(...args);
    this.on = (...args) => engine.on(...args);
    this.store = engine.store;
 
    debug('constructor ended');
  }
}