1- import * as _ from 'lodash' ;
2- import fetch from 'node-fetch' ;
31import { CompletedRequest } from 'mockttp' ;
42import { setupInterceptor , itIsAvailable } from './interceptor-test-utils' ;
53import { expect } from 'chai' ;
6- import { delay } from '../../src/util' ;
74
85const interceptorSetup = setupInterceptor ( 'fresh-firefox' ) ;
96
107describe ( 'Firefox interceptor' , function ( ) {
11- this . timeout ( 5000 ) ;
8+ this . timeout ( 10000 ) ;
129
1310 beforeEach ( async ( ) => {
1411 const { server } = await interceptorSetup ;
@@ -25,11 +22,8 @@ describe('Firefox interceptor', function () {
2522 itIsAvailable ( interceptorSetup ) ;
2623
2724 it ( 'successfully makes requests' , async function ( ) {
28- this . timeout ( 10000 ) ;
2925 const { server, interceptor : firefoxInterceptor } = await interceptorSetup ;
3026
31- await firefoxInterceptor . activate ( server . port ) ;
32-
3327 const exampleRequestReceived = new Promise < CompletedRequest > ( ( resolve ) =>
3428 server . on ( 'request' , ( req ) => {
3529 if ( req . url . startsWith ( 'https://amiusing.httptoolkit.tech' ) ) {
@@ -55,6 +49,5 @@ describe('Firefox interceptor', function () {
5549
5650 await interceptor . deactivateAll ( ) ;
5751 expect ( interceptor . isActive ( server . port ) ) . to . equal ( false ) ;
58- await delay ( 500 ) ; // Wait to ensure the profile is cleaned up
5952 } ) ;
6053} ) ;
0 commit comments