File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import HttpRequestHandler from '../handlers/HttpRequestHandler';
99import HeadersHandler from '../handlers/HeadersHandler' ;
1010import MitmRequestContext from '../lib/MitmRequestContext' ;
1111import { parseRawHeaders } from '../lib/Utils' ;
12+ import CacheHandler from '../handlers/CacheHandler' ;
1213
1314const mocks = {
1415 httpRequestHandler : {
@@ -222,6 +223,8 @@ test('should handle h2 client going to h1 request', async () => {
222223
223224test ( 'should handle cache headers for h2' , async ( ) => {
224225 const etags : string [ ] = [ ] ;
226+ CacheHandler . isEnabled = true ;
227+ Helpers . onClose ( ( ) => ( CacheHandler . isEnabled = false ) ) ;
225228 const server = await Helpers . runHttp2Server ( ( req , res1 ) => {
226229 if ( req . headers [ ':path' ] === '/cached' ) {
227230 etags . push ( req . headers [ 'if-none-match' ] as string ) ;
You can’t perform that action at this time.
0 commit comments