Skip to content

Commit

Permalink
Support snapshotSerializers in jest config resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Sep 9, 2024
1 parent b41594d commit b69c6a3
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 @@ -77,6 +77,7 @@ const resolveDependencies = async (config: JestInitialOptions, options: PluginOp

const testResultsProcessor = config.testResultsProcessor ? [config.testResultsProcessor] : [];
const snapshotResolver = config.snapshotResolver ? [config.snapshotResolver] : [];
const snapshotSerializers = config.snapshotSerializers ?? [];
const testSequencer = config.testSequencer ? [config.testSequencer] : [];

const resolve = (specifier: string) => resolveEntry(options, specifier);
Expand All @@ -99,6 +100,7 @@ const resolveDependencies = async (config: JestInitialOptions, options: PluginOp
...moduleNameMapper,
...testResultsProcessor,
...snapshotResolver,
...snapshotSerializers,
...testSequencer,
...globalSetup,
...globalTeardown,
Expand Down

0 comments on commit b69c6a3

Please sign in to comment.