@@ -18,7 +18,7 @@ describe('ServerRedis', () => {
1818 client = {
1919 on : onSpy
2020 } ;
21- createRedisClient = sinon . stub ( server , 'createRedisClient' , ( ) => client ) ;
21+ createRedisClient = sinon . stub ( server , 'createRedisClient' ) . callsFake ( ( ) => client ) ;
2222 } ) ;
2323 it ( 'should bind "connect" event to handler' , ( ) => {
2424 server . listen ( null ) ;
@@ -71,8 +71,8 @@ describe('ServerRedis', () => {
7171
7272 beforeEach ( ( ) => {
7373 getPublisherSpy = sinon . spy ( ) ;
74- sinon . stub ( server , 'getPublisher' , ( ) => getPublisherSpy ) ;
75- sinon . stub ( server , 'tryParse' , ( ) => ( { data } ) )
74+ sinon . stub ( server , 'getPublisher' ) . callsFake ( ( ) => getPublisherSpy ) ;
75+ sinon . stub ( server , 'tryParse' ) . callsFake ( ( ) => ( { data } ) ) ;
7676 } ) ;
7777 it ( `should publish NO_PATTERN_MESSAGE if pattern not exists in msgHandlers object` , ( ) => {
7878 server . handleMessage ( channel , { } , null ) ;
@@ -92,7 +92,7 @@ describe('ServerRedis', () => {
9292 let publisherSpy : sinon . SinonSpy , handler ;
9393 beforeEach ( ( ) => {
9494 publisherSpy = sinon . spy ( ) ;
95- sinon . stub ( server , 'getPublisher' , ( ) => publisherSpy ) ;
95+ sinon . stub ( server , 'getPublisher' ) . callsFake ( ( ) => publisherSpy ) ;
9696 handler = server . getMessageHandlerCallback ( null , null ) ;
9797 } ) ;
9898 it ( `should return function` , ( ) => {
0 commit comments