File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -1746,7 +1746,7 @@ describe('GraphQLModule', () => {
17461746 moduleB ,
17471747 ] ,
17481748 } ) ;
1749- const mockRequests : Array < MockResponse < { hugeLoad : number [ ] } > > = [ ] ;
1749+ const mockRequests : Array < MockSession < { hugeLoad : number [ ] } > > = [ ] ;
17501750 for ( let i = 0 ; i < 1000 ; i ++ ) {
17511751 mockRequests . push ( createMockSession ( { hugeLoad : new Array ( 1000 ) . fill ( 1000 ) } ) ) ;
17521752 }
@@ -1759,25 +1759,14 @@ describe('GraphQLModule', () => {
17591759 contextValue : mockRequest ,
17601760 document : gql `{ aLoadLength bLoadLength abLoadLength baLoadLength }` ,
17611761 } ) ;
1762- mockRequest . res . once ( 'finish' , ( ) => {
1763- setTimeout ( ( ) => {
1764- // tslint:disable-next-line: no-console
1765- console . log ( 'resolved' ) ;
1766- // tslint:disable-next-line: no-console
1767- console . time ( 'GC' ) ;
1768- ( global . gc as any ) ( true ) ;
1769- // tslint:disable-next-line: no-console
1770- console . timeEnd ( 'GC' ) ;
1771- resolve ( ) ;
1772- } , 1000 ) ;
1773- } ) ;
17741762 mockRequest . res . emit ( 'finish' ) ;
17751763 expect ( data . aLoadLength ) . toBe ( 1000 ) ;
17761764 expect ( data . bLoadLength ) . toBe ( 1000 ) ;
17771765 expect ( data . abLoadLength ) . toBe ( 1000 ) ;
17781766 expect ( data . baLoadLength ) . toBe ( 1000 ) ;
17791767 // tslint:disable-next-line: no-console
17801768 console . log ( counter ) ;
1769+ resolve ( ) ;
17811770 } ) ) . then ( ( ) => {
17821771 done ( ) ;
17831772 } ) . catch ( done . fail ) ;
You can’t perform that action at this time.
0 commit comments