Skip to content

Commit

Permalink
docs: add documentation of the jest.deepUnmock() method (#13774)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrazauskas authored Jan 17, 2023
1 parent c010e35 commit 8ef8c20
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/JestObjectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,12 @@ The most common use of this API is for specifying the module a given test intend

Returns the `jest` object for chaining.

### `jest.deepUnmock(moduleName)`

Indicates that the module system should never return a mocked version of the specified module and its dependencies.

Returns the `jest` object for chaining.

### `jest.doMock(moduleName, factory, options)`

When using `babel-jest`, calls to `mock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior.
Expand Down
6 changes: 6 additions & 0 deletions website/versioned_docs/version-25.x/JestObjectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ The most common use of this API is for specifying the module a given test intend

Returns the `jest` object for chaining.

### `jest.deepUnmock(moduleName)`

Indicates that the module system should never return a mocked version of the specified module and its dependencies.

Returns the `jest` object for chaining.

### `jest.doMock(moduleName, factory, options)`

When using `babel-jest`, calls to `mock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior.
Expand Down
6 changes: 6 additions & 0 deletions website/versioned_docs/version-26.x/JestObjectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,12 @@ The most common use of this API is for specifying the module a given test intend

Returns the `jest` object for chaining.

### `jest.deepUnmock(moduleName)`

Indicates that the module system should never return a mocked version of the specified module and its dependencies.

Returns the `jest` object for chaining.

### `jest.doMock(moduleName, factory, options)`

When using `babel-jest`, calls to `mock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior.
Expand Down
6 changes: 6 additions & 0 deletions website/versioned_docs/version-27.x/JestObjectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,12 @@ The most common use of this API is for specifying the module a given test intend

Returns the `jest` object for chaining.

### `jest.deepUnmock(moduleName)`

Indicates that the module system should never return a mocked version of the specified module and its dependencies.

Returns the `jest` object for chaining.

### `jest.doMock(moduleName, factory, options)`

When using `babel-jest`, calls to `mock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior.
Expand Down
6 changes: 6 additions & 0 deletions website/versioned_docs/version-28.x/JestObjectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,12 @@ The most common use of this API is for specifying the module a given test intend

Returns the `jest` object for chaining.

### `jest.deepUnmock(moduleName)`

Indicates that the module system should never return a mocked version of the specified module and its dependencies.

Returns the `jest` object for chaining.

### `jest.doMock(moduleName, factory, options)`

When using `babel-jest`, calls to `mock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior.
Expand Down
6 changes: 6 additions & 0 deletions website/versioned_docs/version-29.0/JestObjectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@ The most common use of this API is for specifying the module a given test intend

Returns the `jest` object for chaining.

### `jest.deepUnmock(moduleName)`

Indicates that the module system should never return a mocked version of the specified module and its dependencies.

Returns the `jest` object for chaining.

### `jest.doMock(moduleName, factory, options)`

When using `babel-jest`, calls to `mock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior.
Expand Down
6 changes: 6 additions & 0 deletions website/versioned_docs/version-29.1/JestObjectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,12 @@ The most common use of this API is for specifying the module a given test intend

Returns the `jest` object for chaining.

### `jest.deepUnmock(moduleName)`

Indicates that the module system should never return a mocked version of the specified module and its dependencies.

Returns the `jest` object for chaining.

### `jest.doMock(moduleName, factory, options)`

When using `babel-jest`, calls to `mock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior.
Expand Down
6 changes: 6 additions & 0 deletions website/versioned_docs/version-29.2/JestObjectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,12 @@ The most common use of this API is for specifying the module a given test intend

Returns the `jest` object for chaining.

### `jest.deepUnmock(moduleName)`

Indicates that the module system should never return a mocked version of the specified module and its dependencies.

Returns the `jest` object for chaining.

### `jest.doMock(moduleName, factory, options)`

When using `babel-jest`, calls to `mock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior.
Expand Down
6 changes: 6 additions & 0 deletions website/versioned_docs/version-29.3/JestObjectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,12 @@ The most common use of this API is for specifying the module a given test intend

Returns the `jest` object for chaining.

### `jest.deepUnmock(moduleName)`

Indicates that the module system should never return a mocked version of the specified module and its dependencies.

Returns the `jest` object for chaining.

### `jest.doMock(moduleName, factory, options)`

When using `babel-jest`, calls to `mock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior.
Expand Down

0 comments on commit 8ef8c20

Please sign in to comment.