Skip to content

Commit

Permalink
fix(jest): update cache function for new Jest 27 API (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Sep 26, 2021
1 parent d8f0f43 commit 438aa46
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/fbjs-scripts/jest/createCacheKeyFunction.js
Expand Up @@ -32,6 +32,8 @@ function getGlobalCacheKey(files, values) {

function getCacheKeyFunction(globalCacheKey) {
return (src, file, configString, options) => {
// Jest 27 passes a single options bag which contains `configString` rather than as a separate argument
options = options || configString;
const {instrument, config} = options;
const rootDir = config && config.rootDir;

Expand Down

0 comments on commit 438aa46

Please sign in to comment.