File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ const Proxy = require('../../lib/core/Proxy');
2
2
const Context = require ( '../../lib/core/Context' ) ;
3
3
const { describe, it, before, after } = require ( 'mocha' ) ;
4
4
const { expect } = require ( 'chai' ) ;
5
- const { spy, stub } = require ( 'sinon' ) ;
5
+ const { spy } = require ( 'sinon' ) ;
6
6
const { kAddNewContext } = require ( '../../lib/config/constants' ) ;
7
7
const http = require ( 'http' ) ;
8
8
@@ -37,9 +37,10 @@ describe('Proxy', () => {
37
37
} ) ;
38
38
39
39
it ( 'should handle request' , ( ) => {
40
- const requestStub = stub ( http , 'request' ) ;
40
+ const requestSpy = spy ( http , 'request' ) ;
41
41
this . proxy . requestHandler ( this . request , this . response ) ;
42
- expect ( requestStub . calledOnce ) . to . be . equal ( true ) ;
42
+ expect ( requestSpy . calledOnce ) . to . be . equal ( true ) ;
43
+ requestSpy . restore ( ) ;
43
44
} ) ;
44
45
45
46
it ( 'should set connection id' , ( ) => {
You can’t perform that action at this time.
0 commit comments