Skip to content
Merged
Prev Previous commit
Next Next commit
added type test, updated CHANGELOG.md, updated the description of the
function, removed the word flag
  • Loading branch information
pepe authored and pepe committed Jan 9, 2023
commit 5bd9de0b128d7744faf21aa18b45a8ec70f44793
8 changes: 2 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

### Features

- `[jest-runtime]` Expose `isEnvironmentTornDown` function ([#13698](https://github.com/facebook/jest/pull/13698))

- `[expect, @jest/expect-utils]` Support custom equality testers ([#13654](https://github.com/facebook/jest/pull/13654))
- `[jest-config, jest-worker]` Use `os.availableParallelism` if available to calculate number of workers to spawn ([#13738](https://github.com/facebook/jest/pull/13738))
- `[@jest/globals, jest-mock]` Add `jest.replaceProperty()` that replaces property value ([#13496](https://github.com/facebook/jest/pull/13496))
Expand All @@ -27,12 +29,6 @@

### Performance

## 29.3.2

### Features

- `[jest-runtime]` Expose `isEnvironmentTornDown` function ([#13698](https://github.com/facebook/jest/pull/13698))

## 29.3.1

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-environment/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export interface Jest {
*/
isolateModules(fn: () => void): Jest;
/**
* A flag that indicates whether the Jest environment has been torn down.
* Returns `true` if test environment has been torn down.
* @example
* if (jest.isEnvironmentTornDown()) {
* // The Jest environment has been torn down, so stop doing work
Expand Down
3 changes: 3 additions & 0 deletions packages/jest-types/__typetests__/jest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -587,3 +587,6 @@ expectError(jest.setTimeout());

expectType<number>(jest.getSeed());
expectError(jest.getSeed(123));

expectType<boolean>(jest.isEnvironmentTornDown());
expectError<boolean>(jest.isEnvironmentTornDown(123));