Skip to content

Commit

Permalink
fix: dispose order
Browse files Browse the repository at this point in the history
  • Loading branch information
barak007 committed Dec 4, 2023
1 parent 38dc6ba commit 3896095
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/test-kit/src/with-feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ export function withFeature(withFeatureOptions: IWithFeatureOptions = {}): WithF
});

const disposables = new Disposables();
disposables.registerGroup(DISPOSE_OF_TEMP_DIRS, { after: 'default' });
disposables.registerGroup(WITH_FEATURE_DISPOSABLES, { after: 'default', before: DISPOSE_OF_TEMP_DIRS });
disposables.registerGroup(PAGE_DISPOSABLES, { before: WITH_FEATURE_DISPOSABLES });
disposables.registerGroup(TRACING_DISPOSABLES, { before: PAGE_DISPOSABLES });
disposables.registerGroup(FINALE, { after: PAGE_DISPOSABLES });
disposables.registerGroup(TRACING_DISPOSABLES, { after: 'default' });
disposables.registerGroup(PAGE_DISPOSABLES, { after: TRACING_DISPOSABLES });
disposables.registerGroup(WITH_FEATURE_DISPOSABLES, { after: PAGE_DISPOSABLES });
disposables.registerGroup(DISPOSE_OF_TEMP_DIRS, { after: WITH_FEATURE_DISPOSABLES });
disposables.registerGroup(FINALE, { after: DISPOSE_OF_TEMP_DIRS });
const onDispose = (disposable: DisposableItem, options?: DisposableOptions) =>
disposables.add(disposable, { group: FINALE, ...options });

Expand Down Expand Up @@ -437,7 +437,7 @@ export function withFeature(withFeatureOptions: IWithFeatureOptions = {}): WithF
await featurePage.close();
},
{
group: FINALE,
group: PAGE_DISPOSABLES,
name: 'close feature page' + (takeScreenshotsOfFailed ? ' and take screenshot' : ''),
timeout: 10_000,
},
Expand Down

0 comments on commit 3896095

Please sign in to comment.