From d23f1ef18567763ab0133372e376ae5026a23d4b Mon Sep 17 00:00:00 2001 From: Michael Withagen Date: Tue, 5 Mar 2019 11:59:41 +0100 Subject: [PATCH] Add note to automock configuration (#8051) --- CHANGELOG.md | 1 + docs/Configuration.md | 2 ++ website/versioned_docs/version-22.x/Configuration.md | 2 ++ website/versioned_docs/version-23.x/Configuration.md | 2 ++ website/versioned_docs/version-24.0/Configuration.md | 2 ++ website/versioned_docs/version-24.1/Configuration.md | 2 ++ 6 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39d765fd161b..ad31ab6fef4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,6 +87,7 @@ - `[docs]`: Improve runAllTimers doc (it exhausts the micro-task queue) ([#8031](https://github.com/facebook/jest/pull/8031)) - `[jest-cli]`: Migrate to TypeScript ([#8024](https://github.com/facebook/jest/pull/8024)) - `[jest]`: Migrate to TypeScript ([#8024](https://github.com/facebook/jest/pull/8024)) +- `[docs]` Update automock configuration, add note related to manual mocks ([#8051](https://github.com/facebook/jest/pull/8051)) ### Performance diff --git a/docs/Configuration.md b/docs/Configuration.md index 585a8a1b6e9d..894e840f4b83 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -95,6 +95,8 @@ test('if utils mocked automatically', () => { }); ``` +_Note: Node modules are automatically mocked when you have a manual mock in place (e.g.: `__mocks__/lodash.js`). More info [here](manual-mocks.html#mocking-node-modules)._ + _Note: Core modules, like `fs`, are not mocked by default. They can be mocked explicitly, like `jest.mock('fs')`._ _Note: Automocking has a performance cost most noticeable in large projects. See [here](troubleshooting.html#tests-are-slow-when-leveraging-automocking) for details and a workaround._ diff --git a/website/versioned_docs/version-22.x/Configuration.md b/website/versioned_docs/version-22.x/Configuration.md index 14271562155d..8647c4cb58f2 100644 --- a/website/versioned_docs/version-22.x/Configuration.md +++ b/website/versioned_docs/version-22.x/Configuration.md @@ -82,6 +82,8 @@ test('if utils mocked automatically', () => { }); ``` +_Note: Node modules are automatically mocked when you have a manual mock in place (e.g.: `__mocks__/lodash.js`). More info [here](manual-mocks.html#mocking-node-modules)._ + _Note: Core modules, like `fs`, are not mocked by default. They can be mocked explicitly, like `jest.mock('fs')`._ _Note: Automocking has a performance cost most noticeable in large projects. See [here](troubleshooting.html#tests-are-slow-when-leveraging-automocking) for details and a workaround._ diff --git a/website/versioned_docs/version-23.x/Configuration.md b/website/versioned_docs/version-23.x/Configuration.md index d7866feec924..605744066224 100644 --- a/website/versioned_docs/version-23.x/Configuration.md +++ b/website/versioned_docs/version-23.x/Configuration.md @@ -96,6 +96,8 @@ test('if utils mocked automatically', () => { }); ``` +_Note: Node modules are automatically mocked when you have a manual mock in place (e.g.: `__mocks__/lodash.js`). More info [here](manual-mocks.html#mocking-node-modules)._ + _Note: Core modules, like `fs`, are not mocked by default. They can be mocked explicitly, like `jest.mock('fs')`._ _Note: Automocking has a performance cost most noticeable in large projects. See [here](troubleshooting.html#tests-are-slow-when-leveraging-automocking) for details and a workaround._ diff --git a/website/versioned_docs/version-24.0/Configuration.md b/website/versioned_docs/version-24.0/Configuration.md index b7c2dc92c3ba..a855c76816fb 100644 --- a/website/versioned_docs/version-24.0/Configuration.md +++ b/website/versioned_docs/version-24.0/Configuration.md @@ -96,6 +96,8 @@ test('if utils mocked automatically', () => { }); ``` +_Note: Node modules are automatically mocked when you have a manual mock in place (e.g.: `__mocks__/lodash.js`). More info [here](manual-mocks.html#mocking-node-modules)._ + _Note: Core modules, like `fs`, are not mocked by default. They can be mocked explicitly, like `jest.mock('fs')`._ _Note: Automocking has a performance cost most noticeable in large projects. See [here](troubleshooting.html#tests-are-slow-when-leveraging-automocking) for details and a workaround._ diff --git a/website/versioned_docs/version-24.1/Configuration.md b/website/versioned_docs/version-24.1/Configuration.md index e79fee27dd77..025f0c8cec21 100644 --- a/website/versioned_docs/version-24.1/Configuration.md +++ b/website/versioned_docs/version-24.1/Configuration.md @@ -96,6 +96,8 @@ test('if utils mocked automatically', () => { }); ``` +_Note: Node modules are automatically mocked when you have a manual mock in place (e.g.: `__mocks__/lodash.js`). More info [here](manual-mocks.html#mocking-node-modules)._ + _Note: Core modules, like `fs`, are not mocked by default. They can be mocked explicitly, like `jest.mock('fs')`._ _Note: Automocking has a performance cost most noticeable in large projects. See [here](troubleshooting.html#tests-are-slow-when-leveraging-automocking) for details and a workaround._