Skip to content

Commit

Permalink
fix: handle older jest-runtime in jest-circus
Browse files Browse the repository at this point in the history
Fixes #10591
  • Loading branch information
SimenB committed Oct 5, 2020
1 parent 2a7b77c commit 9d977bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

### Performance

## 26.5.1

### Fixes

- `[jest-circus]` Handle older `jest-runtime` in `jest-circus`

## 26.5.0

### Features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ const jestAdapter = async (
});

const runtimeGlobals = {expect, ...globals};
runtime.setGlobalsForRuntime(runtimeGlobals);
// TODO: `jest-circus` might be newer than `jest-runtime` - remove `?.` for Jest 27
runtime.setGlobalsForRuntime?.(runtimeGlobals);

// TODO: `jest-circus` might be newer than `jest-config` - remove `??` for Jest 27
if (config.injectGlobals ?? true) {
Expand Down

0 comments on commit 9d977bc

Please sign in to comment.