Skip to content

Commit

Permalink
Support Jest's globalTeardown
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwilsonperkin committed Jun 10, 2024
1 parent 021e9bb commit d77eca4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/knip/src/plugins/jest/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const resolveDependencies = async (config: JestInitialOptions, options: PluginOp
const snapshotResolver = config.snapshotResolver ? [config.snapshotResolver] : [];
const testSequencer = config.testSequencer ? [config.testSequencer] : [];
const globalSetup = config.globalSetup ? [config.globalSetup] : [];
const globalTeardown = config.globalTeardown ? [config.globalTeardown] : [];

return [
...presets,
Expand All @@ -93,6 +94,7 @@ const resolveDependencies = async (config: JestInitialOptions, options: PluginOp
...snapshotResolver,
...testSequencer,
...globalSetup,
...globalTeardown,
];
};

Expand Down

0 comments on commit d77eca4

Please sign in to comment.