Skip to content

Commit d85d542

Browse files
authored
docs: add few more missing admonitions (#14100)
1 parent 3a76e40 commit d85d542

File tree

15 files changed

+55
-25
lines changed

15 files changed

+55
-25
lines changed

docs/SnapshotTesting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Once you're finished, Jest will give you a summary before returning back to watc
106106

107107
Inline snapshots behave identically to external snapshots (`.snap` files), except the snapshot values are written automatically back into the source code. This means you can get the benefits of automatically generated snapshots without having to switch to an external file to make sure the correct value was written.
108108

109-
**Example:**
109+
Example:
110110

111111
First, you write a test, calling `.toMatchInlineSnapshot()` with no arguments:
112112

website/versioned_docs/version-25.x/MockFunctionAPI.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,11 @@ You can see an example of using Jest with TypeScript in our [GitHub repository](
360360

361361
### `jest.MockedFunction`
362362

363-
> `jest.MockedFunction` is available in the `@types/jest` module from version `24.9.0`.
363+
:::tip
364+
365+
`jest.MockedFunction` is available in the `@types/jest` module from version `24.9.0`.
366+
367+
:::
364368

365369
The following examples will assume you have an understanding of how [Jest mock functions work with JavaScript](MockFunctions.md).
366370

@@ -424,7 +428,11 @@ test('calculate calls add', () => {
424428

425429
### `jest.MockedClass`
426430

427-
> `jest.MockedClass` is available in the `@types/jest` module from version `24.9.0`.
431+
:::tip
432+
433+
`jest.MockedClass` is available in the `@types/jest` module from version `24.9.0`.
434+
435+
:::
428436

429437
The following examples will assume you have an understanding of how [Jest mock classes work with JavaScript](Es6ClassMocks.md).
430438

website/versioned_docs/version-25.x/SnapshotTesting.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,15 @@ Once you're finished, Jest will give you a summary before returning back to watc
107107

108108
Inline snapshots behave identically to external snapshots (`.snap` files), except the snapshot values are written automatically back into the source code. This means you can get the benefits of automatically generated snapshots without having to switch to an external file to make sure the correct value was written.
109109

110-
> Inline snapshots are powered by [Prettier](https://prettier.io). To use inline snapshots you must have `prettier` installed in your project. Your Prettier configuration will be respected when writing to test files.
111-
>
112-
> If you have `prettier` installed in a location where Jest can't find it, you can tell Jest how to find it using the [`"prettierPath"`](./Configuration.md#prettierpath-string) configuration property.
110+
:::info
111+
112+
Inline snapshots are powered by [Prettier](https://prettier.io). To use inline snapshots you must have `prettier` installed in your project. Your Prettier configuration will be respected when writing to test files.
113+
114+
If you have `prettier` installed in a location where Jest can't find it, you can tell Jest how to find it using the [`prettierPath`](./Configuration.md#prettierpath-string) configuration property.
115+
116+
:::
113117

114-
**Example:**
118+
Example:
115119

116120
First, you write a test, calling `.toMatchInlineSnapshot()` with no arguments:
117121

website/versioned_docs/version-26.x/MockFunctionAPI.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,11 @@ You can see an example of using Jest with TypeScript in our [GitHub repository](
360360

361361
### `jest.MockedFunction`
362362

363-
> `jest.MockedFunction` is available in the `@types/jest` module from version `24.9.0`.
363+
:::tip
364+
365+
`jest.MockedFunction` is available in the `@types/jest` module from version `24.9.0`.
366+
367+
:::
364368

365369
The following examples will assume you have an understanding of how [Jest mock functions work with JavaScript](MockFunctions.md).
366370

@@ -424,7 +428,11 @@ test('calculate calls add', () => {
424428

425429
### `jest.MockedClass`
426430

427-
> `jest.MockedClass` is available in the `@types/jest` module from version `24.9.0`.
431+
:::tip
432+
433+
`jest.MockedClass` is available in the `@types/jest` module from version `24.9.0`.
434+
435+
:::
428436

429437
The following examples will assume you have an understanding of how [Jest mock classes work with JavaScript](Es6ClassMocks.md).
430438

website/versioned_docs/version-26.x/SnapshotTesting.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,15 @@ Once you're finished, Jest will give you a summary before returning back to watc
107107

108108
Inline snapshots behave identically to external snapshots (`.snap` files), except the snapshot values are written automatically back into the source code. This means you can get the benefits of automatically generated snapshots without having to switch to an external file to make sure the correct value was written.
109109

110-
> Inline snapshots are powered by [Prettier](https://prettier.io). To use inline snapshots you must have `prettier` installed in your project. Your Prettier configuration will be respected when writing to test files.
111-
>
112-
> If you have `prettier` installed in a location where Jest can't find it, you can tell Jest how to find it using the [`"prettierPath"`](./Configuration.md#prettierpath-string) configuration property.
110+
:::info
111+
112+
Inline snapshots are powered by [Prettier](https://prettier.io). To use inline snapshots you must have `prettier` installed in your project. Your Prettier configuration will be respected when writing to test files.
113+
114+
If you have `prettier` installed in a location where Jest can't find it, you can tell Jest how to find it using the [`prettierPath`](./Configuration.md#prettierpath-string) configuration property.
115+
116+
:::
113117

114-
**Example:**
118+
Example:
115119

116120
First, you write a test, calling `.toMatchInlineSnapshot()` with no arguments:
117121

website/versioned_docs/version-26.x/TimerMocks.md

-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ describe('infiniteTimerGame', () => {
128128

129129
## Advance Timers by Time
130130

131-
##### renamed from `runTimersToTime` to `advanceTimersByTime` in Jest **22.0.0**
132-
133131
Another possibility is use `jest.advanceTimersByTime(msToRun)`. When this API is called, all timers are advanced by `msToRun` milliseconds. All pending "macro-tasks" that have been queued via setTimeout() or setInterval(), and would be executed during this time frame, will be executed. Additionally, if those macro-tasks schedule new macro-tasks that would be executed within the same time frame, those will be executed until there are no more macro-tasks remaining in the queue that should be run within msToRun milliseconds.
134132

135133
```javascript title="timerGame.js"

website/versioned_docs/version-27.x/MockFunctionAPI.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,11 @@ You can see an example of using Jest with TypeScript in our [GitHub repository](
370370

371371
### `jest.MockedFunction`
372372

373-
> `jest.MockedFunction` is available in the `@types/jest` module from version `24.9.0`.
373+
:::tip
374+
375+
`jest.MockedFunction` is available in the `@types/jest` module from version `24.9.0`.
376+
377+
:::
374378

375379
The following examples will assume you have an understanding of how [Jest mock functions work with JavaScript](MockFunctions.md).
376380

@@ -434,7 +438,11 @@ test('calculate calls add', () => {
434438

435439
### `jest.MockedClass`
436440

437-
> `jest.MockedClass` is available in the `@types/jest` module from version `24.9.0`.
441+
:::tip
442+
443+
`jest.MockedClass` is available in the `@types/jest` module from version `24.9.0`.
444+
445+
:::
438446

439447
The following examples will assume you have an understanding of how [Jest mock classes work with JavaScript](Es6ClassMocks.md).
440448

website/versioned_docs/version-27.x/SnapshotTesting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Once you're finished, Jest will give you a summary before returning back to watc
107107

108108
Inline snapshots behave identically to external snapshots (`.snap` files), except the snapshot values are written automatically back into the source code. This means you can get the benefits of automatically generated snapshots without having to switch to an external file to make sure the correct value was written.
109109

110-
**Example:**
110+
Example:
111111

112112
First, you write a test, calling `.toMatchInlineSnapshot()` with no arguments:
113113

website/versioned_docs/version-28.x/SnapshotTesting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Once you're finished, Jest will give you a summary before returning back to watc
106106

107107
Inline snapshots behave identically to external snapshots (`.snap` files), except the snapshot values are written automatically back into the source code. This means you can get the benefits of automatically generated snapshots without having to switch to an external file to make sure the correct value was written.
108108

109-
**Example:**
109+
Example:
110110

111111
First, you write a test, calling `.toMatchInlineSnapshot()` with no arguments:
112112

website/versioned_docs/version-29.0/SnapshotTesting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Once you're finished, Jest will give you a summary before returning back to watc
106106

107107
Inline snapshots behave identically to external snapshots (`.snap` files), except the snapshot values are written automatically back into the source code. This means you can get the benefits of automatically generated snapshots without having to switch to an external file to make sure the correct value was written.
108108

109-
**Example:**
109+
Example:
110110

111111
First, you write a test, calling `.toMatchInlineSnapshot()` with no arguments:
112112

website/versioned_docs/version-29.1/SnapshotTesting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Once you're finished, Jest will give you a summary before returning back to watc
106106

107107
Inline snapshots behave identically to external snapshots (`.snap` files), except the snapshot values are written automatically back into the source code. This means you can get the benefits of automatically generated snapshots without having to switch to an external file to make sure the correct value was written.
108108

109-
**Example:**
109+
Example:
110110

111111
First, you write a test, calling `.toMatchInlineSnapshot()` with no arguments:
112112

website/versioned_docs/version-29.2/SnapshotTesting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Once you're finished, Jest will give you a summary before returning back to watc
106106

107107
Inline snapshots behave identically to external snapshots (`.snap` files), except the snapshot values are written automatically back into the source code. This means you can get the benefits of automatically generated snapshots without having to switch to an external file to make sure the correct value was written.
108108

109-
**Example:**
109+
Example:
110110

111111
First, you write a test, calling `.toMatchInlineSnapshot()` with no arguments:
112112

website/versioned_docs/version-29.3/SnapshotTesting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Once you're finished, Jest will give you a summary before returning back to watc
106106

107107
Inline snapshots behave identically to external snapshots (`.snap` files), except the snapshot values are written automatically back into the source code. This means you can get the benefits of automatically generated snapshots without having to switch to an external file to make sure the correct value was written.
108108

109-
**Example:**
109+
Example:
110110

111111
First, you write a test, calling `.toMatchInlineSnapshot()` with no arguments:
112112

website/versioned_docs/version-29.4/SnapshotTesting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Once you're finished, Jest will give you a summary before returning back to watc
106106

107107
Inline snapshots behave identically to external snapshots (`.snap` files), except the snapshot values are written automatically back into the source code. This means you can get the benefits of automatically generated snapshots without having to switch to an external file to make sure the correct value was written.
108108

109-
**Example:**
109+
Example:
110110

111111
First, you write a test, calling `.toMatchInlineSnapshot()` with no arguments:
112112

website/versioned_docs/version-29.5/SnapshotTesting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Once you're finished, Jest will give you a summary before returning back to watc
106106

107107
Inline snapshots behave identically to external snapshots (`.snap` files), except the snapshot values are written automatically back into the source code. This means you can get the benefits of automatically generated snapshots without having to switch to an external file to make sure the correct value was written.
108108

109-
**Example:**
109+
Example:
110110

111111
First, you write a test, calling `.toMatchInlineSnapshot()` with no arguments:
112112

0 commit comments

Comments
 (0)