Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 22, 2022
1 parent f1e14b0 commit 32a1fd6
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 24 deletions.
4 changes: 1 addition & 3 deletions docs/Es6ClassMocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ jest.mock('./sound-player', () => {
});
```

:::caution
Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz).
:::
:::caution Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz). :::

For example, the following will throw an out-of-scope error due to the use of 'fake' instead of 'mock' in the variable declaration.

Expand Down
4 changes: 1 addition & 3 deletions website/versioned_docs/version-25.x/Es6ClassMocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ jest.mock('./sound-player', () => {
});
```

:::caution
Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz).
:::
:::caution Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz). :::

For example, the following will throw an out-of-scope error due to the use of 'fake' instead of 'mock' in the variable declaration.

Expand Down
4 changes: 1 addition & 3 deletions website/versioned_docs/version-26.x/Es6ClassMocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ jest.mock('./sound-player', () => {
});
```

:::caution
Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz).
:::
:::caution Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz). :::

For example, the following will throw an out-of-scope error due to the use of 'fake' instead of 'mock' in the variable declaration.

Expand Down
4 changes: 1 addition & 3 deletions website/versioned_docs/version-27.0/Es6ClassMocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ jest.mock('./sound-player', () => {
});
```

:::caution
Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz).
:::
:::caution Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz). :::

For example, the following will throw an out-of-scope error due to the use of 'fake' instead of 'mock' in the variable declaration.

Expand Down
4 changes: 1 addition & 3 deletions website/versioned_docs/version-27.1/Es6ClassMocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ jest.mock('./sound-player', () => {
});
```

:::caution
Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz).
:::
:::caution Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz). :::

For example, the following will throw an out-of-scope error due to the use of 'fake' instead of 'mock' in the variable declaration.

Expand Down
4 changes: 1 addition & 3 deletions website/versioned_docs/version-27.2/Es6ClassMocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ jest.mock('./sound-player', () => {
});
```

:::caution
Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz).
:::
:::caution Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz). :::

For example, the following will throw an out-of-scope error due to the use of 'fake' instead of 'mock' in the variable declaration.

Expand Down
4 changes: 1 addition & 3 deletions website/versioned_docs/version-27.4/Es6ClassMocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ jest.mock('./sound-player', () => {
});
```

:::caution
Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz).
:::
:::caution Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz). :::

For example, the following will throw an out-of-scope error due to the use of 'fake' instead of 'mock' in the variable declaration.

Expand Down
4 changes: 1 addition & 3 deletions website/versioned_docs/version-27.5/Es6ClassMocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ jest.mock('./sound-player', () => {
});
```

:::caution
Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz).
:::
:::caution Since calls to `jest.mock()` are hoisted to the top of the file, Jest prevents access to out-of-scope variables. By default, you cannot first define a variable and then use it in the factory. Jest will disable this check for variables that start with the word `mock`. However, it is still up to you to guarantee that they will be initialized on time. Be aware of [Temporal Dead Zone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz). :::

For example, the following will throw an out-of-scope error due to the use of 'fake' instead of 'mock' in the variable declaration.

Expand Down

0 comments on commit 32a1fd6

Please sign in to comment.