1- import  {  Server  }  from  'http' ; 
1+ import  type   {  Server  }  from  'http' ; 
22import  axios  from  'axios' ; 
33import  {  expect  }  from  'chai' ; 
4- import  {  Response  }  from  'express' ; 
4+ import  type   {  Response  }  from  'express' ; 
55import  _  from  'lodash' ; 
66import  type  {  SinonStub  }  from  'sinon' ; 
77import  sinon  from  'sinon' ; 
88import  {  EXCEPTION_CODE  }  from  '@constants/index' ; 
99import  MicroserviceResponse  from  '@core/microservice-response' ; 
1010import  {  CookiesAction  }  from  '@interfaces/core/i-microservice-response' ; 
11- import  {  MiddlewareHandler ,  MiddlewareType  }  from  '@interfaces/services/i-abstract-microservice' ; 
12- import  {  IExpressRequest  }  from  '@interfaces/services/i-gateway' ; 
11+ import  type  {  MiddlewareHandler  }  from  '@interfaces/services/i-abstract-microservice' ; 
12+ import  {  MiddlewareType  }  from  '@interfaces/services/i-abstract-microservice' ; 
13+ import  type  {  IExpressRequest  }  from  '@interfaces/services/i-gateway' ; 
1314import  AbstractMicroservice  from  '@services/abstract-microservice' ; 
1415import  Gateway  from  '@services/gateway' ; 
1516
@@ -407,7 +408,7 @@ describe('services/gateway', () => {
407408              value : 'test1' , 
408409              options : {  httpOnly : true  } , 
409410            } , 
410-             {  action : CookiesAction . remove ,  name : 'cookie2'  } , 
411+             {  action : CookiesAction . remove ,  name : 'cookie2' ,   options :  {   domain :  'test'   }  } , 
411412          ] , 
412413        } , 
413414      } , 
@@ -423,7 +424,12 @@ describe('services/gateway', () => {
423424    const  result  =  res . json . firstCall . firstArg ; 
424425
425426    expect ( addCookie ) . to . deep . equal ( [ 'cookie1' ,  'test1' ,  {  httpOnly : true  } ] ) ; 
426-     expect ( clearCookie ) . to . deep . equal ( [ 'cookie2' ] ) ; 
427+     expect ( clearCookie ) . to . deep . equal ( [ 
428+       'cookie2' , 
429+       { 
430+         domain : 'test' , 
431+       } , 
432+     ] ) ; 
427433    expect ( result . payload ) . to . undefined ; 
428434  } ) ; 
429435} ) ; 
0 commit comments