@@ -39,7 +39,7 @@ describe('ListenersController', () => {
3939 ) ;
4040 rpcContextCreator = sinon . createStubInstance ( RpcContextCreator ) as any ;
4141 proxySpy = sinon . spy ( ) ;
42- ( rpcContextCreator as any ) . create . callsFake ( ( ) => proxySpy ) ;
42+ ( rpcContextCreator as any ) . create . callsFake ( ( ) => proxySpy ) ;
4343 instance = new ListenersController (
4444 new ClientsContainer ( ) ,
4545 rpcContextCreator ,
@@ -55,7 +55,7 @@ describe('ListenersController', () => {
5555 } ;
5656 } ) ;
5757
58- describe ( 'bindPatternHandlers ' , ( ) => {
58+ describe ( 'registerPatternHandlers ' , ( ) => {
5959 const handlers = [
6060 { pattern : 'test' , targetCallback : 'tt' } ,
6161 { pattern : 'test2' , targetCallback : '2' } ,
@@ -66,13 +66,13 @@ describe('ListenersController', () => {
6666 } ) ;
6767 it ( `should call "addHandler" method of server for each pattern handler` , ( ) => {
6868 explorer . expects ( 'explore' ) . returns ( handlers ) ;
69- instance . bindPatternHandlers ( new InstanceWrapper ( ) , server , '' ) ;
69+ instance . registerPatternHandlers ( new InstanceWrapper ( ) , server , '' ) ;
7070 expect ( addSpy . calledTwice ) . to . be . true ;
7171 } ) ;
7272 describe ( 'when request scoped' , ( ) => {
7373 it ( `should call "addHandler" with deffered proxy` , ( ) => {
7474 explorer . expects ( 'explore' ) . returns ( handlers ) ;
75- instance . bindPatternHandlers (
75+ instance . registerPatternHandlers (
7676 new InstanceWrapper ( { scope : Scope . REQUEST } ) ,
7777 server ,
7878 '' ,
@@ -93,8 +93,10 @@ describe('ListenersController', () => {
9393 handle : handleSpy ,
9494 } as any ) ,
9595 ) ;
96-
97- sinon . stub ( ( instance as any ) , 'registerRequestProvider' ) . callsFake ( ( ) => ( { } as any ) ) ;
96+
97+ sinon
98+ . stub ( instance as any , 'registerRequestProvider' )
99+ . callsFake ( ( ) => ( { } as any ) ) ;
98100 } ) ;
99101
100102 describe ( 'when "loadPerContext" resolves' , ( ) => {
@@ -107,19 +109,21 @@ describe('ListenersController', () => {
107109 const wrapper = new InstanceWrapper ( { instance : { [ methodKey ] : { } } } ) ;
108110
109111 it ( 'should pass all arguments to the proxy chain' , async ( ) => {
110- sinon . stub ( injector , 'loadPerContext' ) . callsFake ( ( ) => Promise . resolve ( { } ) ) ;
112+ sinon
113+ . stub ( injector , 'loadPerContext' )
114+ . callsFake ( ( ) => Promise . resolve ( { } ) ) ;
111115 const handler = instance . createRequestScopedHandler (
112116 wrapper ,
113117 pattern ,
114118 module ,
115119 moduleKey ,
116120 methodKey ,
117121 ) ;
118- await handler ( " data" , " metadata" ) ;
122+ await handler ( ' data' , ' metadata' ) ;
119123
120124 expect ( proxySpy . called ) . to . be . true ;
121- expect ( proxySpy . getCall ( 0 ) . args [ 0 ] ) . to . be . eql ( " data" ) ;
122- expect ( proxySpy . getCall ( 0 ) . args [ 1 ] ) . to . be . eql ( " metadata" ) ;
125+ expect ( proxySpy . getCall ( 0 ) . args [ 0 ] ) . to . be . eql ( ' data' ) ;
126+ expect ( proxySpy . getCall ( 0 ) . args [ 1 ] ) . to . be . eql ( ' metadata' ) ;
123127 } ) ;
124128 } ) ;
125129
@@ -165,7 +169,7 @@ describe('ListenersController', () => {
165169 } ) ;
166170 } ) ;
167171
168- describe ( 'bindClientsToProperties ' , ( ) => {
172+ describe ( 'assignClientsToProperties ' , ( ) => {
169173 class TestClass { }
170174
171175 it ( 'should bind all clients to properties' , ( ) => {
@@ -184,7 +188,7 @@ describe('ListenersController', () => {
184188 instance ,
185189 'assignClientToInstance' ,
186190 ) ;
187- instance . bindClientsToProperties ( controller ) ;
191+ instance . assignClientsToProperties ( controller ) ;
188192
189193 expect ( assignClientToInstanceSpy . calledOnce ) . to . be . true ;
190194 } ) ;
0 commit comments