Skip to content

Commit 630b5c0

Browse files
SimenBcpojer
authored andcommitted
chore: add missing release to changelog (#5348)
* chore: add missing release to changelog * docs: run prettier on all markdown * docs: add missing parens in changelog
1 parent e8eb1d1 commit 630b5c0

File tree

4 files changed

+37
-29
lines changed

4 files changed

+37
-29
lines changed

CHANGELOG.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
* `[jest-config]` Added restoreMocks config option.
2222
([#5327](https://github.com/facebook/jest/pull/5327))
2323

24+
## jest 22.1.1
25+
26+
### Fixes
27+
28+
* `[*]` Move from "process.exit" to "exit.
29+
([#5313](https://github.com/facebook/jest/pull/5313))
30+
2431
## jest 22.1.0
2532

2633
### Features
@@ -30,14 +37,18 @@
3037
having been passed to the CLI
3138

3239
### Fixes
40+
3341
* `[jest-cli]` Use `import-local` to support global Jest installations.
3442
([#5304](https://github.com/facebook/jest/pull/5304))
3543
* `[jest-runner]` Fix memory leak in coverage reporting
3644
([#5289](https://github.com/facebook/jest/pull/5289))
37-
* `[docs]` Update mention of the minimal version of node supported [#4947](https://github.com/facebook/jest/issues/4947)
38-
* `[jest-cli]` Fix missing newline in console message ([#5308](https://github.com/facebook/jest/pull/5308))
45+
* `[docs]` Update mention of the minimal version of node supported
46+
([#4947](https://github.com/facebook/jest/issues/4947))
47+
* `[jest-cli]` Fix missing newline in console message
48+
([#5308](https://github.com/facebook/jest/pull/5308))
3949
* `[jest-cli]` `--lastCommit` and `--changedFilesWithAncestor` now take effect
40-
even when `--onlyChanged` is not specified. ([#5307](https://github.com/facebook/jest/pull/5307))
50+
even when `--onlyChanged` is not specified.
51+
([#5307](https://github.com/facebook/jest/pull/5307))
4152

4253
### Chore & Maintenance
4354

docs/Configuration.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ For example, the following would create a global `__DEV__` variable set to
296296
Note that, if you specify a global reference value (like an object or array)
297297
here, and some code mutates that value in the midst of running a test, that
298298
mutation will _not_ be persisted across test runs for other test files. In
299-
addition the `globals` object must be json-serializable, so it can't be used
300-
to specify global functions. For that you should use `setupFiles`.
299+
addition the `globals` object must be json-serializable, so it can't be used to
300+
specify global functions. For that you should use `setupFiles`.
301301

302302
### `globalSetup` [string]
303303

@@ -611,8 +611,7 @@ Default: `false`
611611

612612
Automatically restore mock state between every test. Equivalent to calling
613613
`jest.restoreAllMocks()` between each test. This will lead to any mocks having
614-
their fake implementations removed and restores their initial
615-
implementation.
614+
their fake implementations removed and restores their initial implementation.
616615

617616
### `rootDir` [string]
618617

docs/TutorialReact.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ The code for this example is available at
186186

187187
#### Snapshot Testing with Mocks, Enzyme and React 16
188188

189-
There's a caveat around snapshot testing when using Enzyme and React 16+.
190-
If you mock out a module using the following style:
189+
There's a caveat around snapshot testing when using Enzyme and React 16+. If you
190+
mock out a module using the following style:
191191

192192
```js
193193
jest.mock('../SomeDirectory/SomeComponent', () => 'SomeComponent');
@@ -202,24 +202,22 @@ Warning: <SomeComponent /> is using uppercase HTML. Always use lowercase HTML ta
202202
Warning: The tag <SomeComponent> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.
203203
```
204204

205-
React 16 triggers these warnings due to how it checks element types, and
206-
the mocked module fails these checks. Your options are:
207-
208-
1. Render as text. This way you won't see the props passed to the mock
209-
component in the snapshot, but it's straightforward:
210-
```js
211-
jest.mock('./SomeComponent', () => () => 'SomeComponent');
212-
```
213-
2. Render as a custom element. DOM "custom elements" aren't checked for
214-
anything and shouldn't fire warnings. They are lowercase and have a
215-
dash in the name.
216-
```js
217-
jest.mock('./Widget', () => 'mock-widget');
218-
```
219-
3. Use `react-test-renderer`. The test renderer doesn't care about
220-
element types and will happily accept e.g. `SomeComponent`. You could
221-
check snapshots using the test renderer, and check component
222-
behaviour separately using Enzyme.
205+
React 16 triggers these warnings due to how it checks element types, and the
206+
mocked module fails these checks. Your options are:
207+
208+
1. Render as text. This way you won't see the props passed to the mock component
209+
in the snapshot, but it's straightforward:
210+
```js
211+
jest.mock('./SomeComponent', () => () => 'SomeComponent');
212+
```
213+
2. Render as a custom element. DOM "custom elements" aren't checked for anything
214+
and shouldn't fire warnings. They are lowercase and have a dash in the name.
215+
```js
216+
jest.mock('./Widget', () => 'mock-widget');
217+
```
218+
3. Use `react-test-renderer`. The test renderer doesn't care about element types
219+
and will happily accept e.g. `SomeComponent`. You could check snapshots using
220+
the test renderer, and check component behaviour separately using Enzyme.
223221

224222
### DOM Testing
225223

docs/TutorialReactNative.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ jest.mock('react-native-video', () => 'Video');
211211
```
212212

213213
This will render the component as `<Video {...props} />` with all of its props
214-
in the snapshot output. See also [caveats around Enzyme and React
215-
16](tutorial-react.html#snapshot-testing-with-mocks-enzyme-and-react-16).
214+
in the snapshot output. See also
215+
[caveats around Enzyme and React 16](tutorial-react.html#snapshot-testing-with-mocks-enzyme-and-react-16).
216216

217217
Sometimes you need to provide a more complex manual mock. For example if you'd
218218
like to forward the prop types or static fields of a native component to a mock,

0 commit comments

Comments
 (0)