File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/browser/cdp/selectivity Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,13 @@ export const getCollectedTestplaneDependencies = (): Set<string> | null => {
5555export const runWithTestplaneDependenciesCollecting = < T > ( fn : ( ) => Promise < T > ) : Promise < T > => {
5656 enableCollectingTestplaneDependencies ( ) ;
5757
58- const store = { jsTestplaneDeps : new Set < string > ( ) } ;
58+ const store : { jsTestplaneDeps ?: Set < string > } = { jsTestplaneDeps : new Set ( ) } ;
5959
60- return testDependenciesStorage . run ( store , fn ) ;
60+ return testDependenciesStorage . run ( store , fn ) . finally ( ( ) => {
61+ // After "fn" completion, "store" is reachable in CDP ping interval callback, so it never GC-removed
62+ // Thats why we do it manually. Removing "jsTestplaneDeps" is enough, and set remains unchanged, if used
63+ delete store . jsTestplaneDeps ;
64+ } ) ;
6165} ;
6266
6367export const readTestFileWithTestplaneDependenciesCollecting = < T > ( file : string , fn : ( ) => Promise < T > ) : Promise < T > => {
You can’t perform that action at this time.
0 commit comments