1- 'use strict' ; 
2- 
3- const 
1+ var 
42  should  =  require ( 'should' ) , 
53  rewire  =  require ( 'rewire' ) , 
64  sinon  =  require ( 'sinon' ) , 
97  Room  =  rewire ( '../../src/Room' ) ; 
108
119describe ( 'Room methods' ,  function  ( )  { 
12-   let 
10+   var 
1311    expectedQuery , 
1412    error , 
1513    result , 
@@ -198,7 +196,7 @@ describe('Room methods', function () {
198196    it ( 'should start dequeuing if subscribed successfully' ,  function  ( done )  { 
199197      room . renew ( { } ,  function  ( )  { } ) ; 
200198
201-       setTimeout ( ( )   =>  { 
199+       setTimeout ( function   ( )  { 
202200        should ( dequeued ) . be . true ( ) ; 
203201        done ( ) ; 
204202      } ,  10 ) ; 
@@ -221,7 +219,7 @@ describe('Room methods', function () {
221219    it ( 'should register itself to Kuzzle and skip subscription if not connected' ,  function  ( done )  { 
222220      kuzzle . state  =  'foo' ; 
223221      room . renew ( { } ,  function  ( )  { } ) ; 
224-       setTimeout ( ( )   =>  { 
222+       setTimeout ( function   ( )  { 
225223        should ( dequeued ) . be . false ( ) ; 
226224        should ( emitted ) . be . false ( ) ; 
227225        should ( room . lastRenewal ) . be . null ( ) ; 
@@ -242,7 +240,7 @@ describe('Room methods', function () {
242240      room . renew ( { } ,  function  ( )  { } ) ; 
243241      room . renew ( { } ,  function  ( )  { } ) ; 
244242
245-       setTimeout ( ( )   =>  { 
243+       setTimeout ( function   ( )  { 
246244        should ( renewals ) . be . eql ( 1 ) ; 
247245        should ( room . lastRenewal ) . be . within ( before ,  after ) ; 
248246        done ( ) ; 
@@ -321,7 +319,7 @@ describe('Room methods', function () {
321319      should ( emitted ) . be . false ( ) ; 
322320      should ( kuzzle . subscriptions . foobar ) . be . undefined ( ) ; 
323321      kuzzle . subscriptions . pending  =  { } ; 
324-       setTimeout ( ( )   =>  { 
322+       setTimeout ( function   ( )  { 
325323        should ( emitted ) . be . true ( ) ; 
326324        done ( ) ; 
327325      } ,  100 ) ; 
@@ -336,7 +334,7 @@ describe('Room methods', function () {
336334      kuzzle . subscriptions . pending  =  { } ; 
337335      kuzzle . subscriptions . foobar  =  { } ; 
338336      kuzzle . subscriptions . foobar . foo  =  { } ; 
339-       setTimeout ( ( )   =>  { 
337+       setTimeout ( function   ( )  { 
340338        should ( emitted ) . be . false ( ) ; 
341339        done ( ) ; 
342340      } ,  100 ) ; 
@@ -381,7 +379,7 @@ describe('Room methods', function () {
381379  } ) ; 
382380
383381  describe ( '#notificationCallback' ,  function  ( )  { 
384-     let 
382+     var 
385383      notifCB  =  Room . __get__ ( 'notificationCallback' ) , 
386384      room ; 
387385
@@ -402,7 +400,7 @@ describe('Room methods', function () {
402400        . have . length ( 1 ) ; 
403401    } ) ; 
404402
405-     it ( 'should handle document notifications' ,  ( )   =>  { 
403+     it ( 'should handle document notifications' ,  function   ( )  { 
406404      notifCB . call ( room ,  { 
407405        controller : 'document' , 
408406        result : { 
@@ -429,7 +427,7 @@ describe('Room methods', function () {
429427        . be . an . instanceOf ( Document ) ; 
430428    } ) ; 
431429
432-     it ( 'should handle realtime publish notifications' ,  ( )   =>  { 
430+     it ( 'should handle realtime publish notifications' ,  function   ( )  { 
433431      notifCB . call ( room ,  { 
434432        controller : 'realtime' , 
435433        action : 'publish' , 
@@ -457,7 +455,7 @@ describe('Room methods', function () {
457455        . be . an . instanceOf ( Document ) ; 
458456    } ) ; 
459457
460-     it ( 'should handle user notifications' ,  ( )   =>  { 
458+     it ( 'should handle user notifications' ,  function   ( )  { 
461459      notifCB . call ( room ,  { 
462460        controller : 'realtime' , 
463461        result : {  count : 3  } 
@@ -473,7 +471,7 @@ describe('Room methods', function () {
473471        } ) ; 
474472    } ) ; 
475473
476-     it ( 'should delete the result from history if emitted by this instance' ,  ( )   =>  { 
474+     it ( 'should delete the result from history if emitted by this instance' ,  function   ( )  { 
477475      room . subscribeToSelf  =  true ; 
478476      kuzzle . requestHistory . bar  =  { } ; 
479477      notifCB . call ( room ,  { error : null ,  result : { } ,  action : 'foo' ,  requestId : 'bar' } ) ; 
@@ -498,7 +496,7 @@ describe('Room methods', function () {
498496        eventEmitted  =  null , 
499497        context  =  { 
500498          kuzzle : { 
501-             emitEvent : event   =>  { 
499+             emitEvent : function   ( event )  { 
502500              eventEmitted  =  event ; 
503501            } 
504502          } 
0 commit comments