From b77f0d965212e4f9cb60564d6f04842bedc5e188 Mon Sep 17 00:00:00 2001 From: Daniel Morrison Date: Wed, 19 Jun 2019 12:36:19 +0100 Subject: [PATCH 1/7] Updated config docs - transform I've added a default option to clear up any confusion, hopefully that will make it more obvious how it should be added back in when additional transformers are added. --- docs/Configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Configuration.md b/docs/Configuration.md index 37dbef0871f6..99ca66dd9e8b 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1119,7 +1119,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `[{".*": "babel-jest"}]` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -1134,7 +1134,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding an additional code preprocessors, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{".(js|jsx)$": "babel-jest"}` or `{".(ts|tsx)$": "babel-jest"}` respectively to the transform array. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] From b99379798ef251b9cd4c3df2ab228a099909e0e9 Mon Sep 17 00:00:00 2001 From: Daniel Morrison Date: Wed, 19 Jun 2019 14:05:27 +0100 Subject: [PATCH 2/7] Updated change log for #8583 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e594f68425cf..38ed4e008219 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -383,6 +383,7 @@ - `[docs]` Add example to `jest.mock` for mocking ES6 modules with the `factory` parameter ([#8550](https://github.com/facebook/jest/pull/8550)) - `[docs]` Add information about using `jest.doMock` with ES6 imports ([#8573](https://github.com/facebook/jest/pull/8573)) - `[docs]` Fix variable name in custom-matcher-api code example ([#8582](https://github.com/facebook/jest/pull/8582)) +<<<<<<< HEAD - `[docs]` Fix example used in custom environment docs ([#8617](https://github.com/facebook/jest/pull/8617)) - `[docs]` Updated react tutorial to refer to new package of react-testing-library (@testing-library/react) ([#8753](https://github.com/facebook/jest/pull/8753)) - `[docs]` Updated imports of react-testing-library to @testing-library/react in website ([#8757](https://github.com/facebook/jest/pull/8757)) @@ -394,6 +395,9 @@ - `[*]` Enforce LF line endings ([#8809](https://github.com/facebook/jest/pull/8809)) - `[pretty-format]` Delete obsolete link and simplify structure in README ([#8824](https://github.com/facebook/jest/pull/8824)) - `[docs]` Fix broken transform link on webpack page ([#9155](https://github.com/facebook/jest/pull/9155)) +======= +- `[docs]` Added default compiler to tranform ([#8583](https://github.com/facebook/jest/pull/8583)) +>>>>>>> Updated change log for #8583 ### Performance From 4914a5b5d0b79fd30f4afbf1ce35a7b593565ae7 Mon Sep 17 00:00:00 2001 From: Daniel Morrison Date: Wed, 19 Jun 2019 18:31:42 +0100 Subject: [PATCH 3/7] Update docs/Configuration.md Co-Authored-By: Tim Seckinger --- docs/Configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Configuration.md b/docs/Configuration.md index 99ca66dd9e8b..5e4b7e6a889e 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1134,7 +1134,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: when adding an additional code preprocessors, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{".(js|jsx)$": "babel-jest"}` or `{".(ts|tsx)$": "babel-jest"}` respectively to the transform array. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{".(js|jsx)$": "babel-jest"}` or `{".(ts|tsx)$": "babel-jest"}` respectively to the transform array. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] From c52b3cce4cf885e10b592e1b652ba53ad49b006f Mon Sep 17 00:00:00 2001 From: Daniel Morrison Date: Wed, 19 Jun 2019 18:36:16 +0100 Subject: [PATCH 4/7] Update Configuration.md --- docs/Configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Configuration.md b/docs/Configuration.md index 5e4b7e6a889e..bd359377947b 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1119,7 +1119,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `[{".*": "babel-jest"}]` +Default: `[{"^.+\\.[jt]sx?$": "babel-jest"}]` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -1134,7 +1134,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{".(js|jsx)$": "babel-jest"}` or `{".(ts|tsx)$": "babel-jest"}` respectively to the transform array. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform array. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] From 07c9de54b393d869eafaee2fdae85befa7d3149e Mon Sep 17 00:00:00 2001 From: Daniel Morrison Date: Thu, 20 Jun 2019 18:08:50 +0100 Subject: [PATCH 5/7] transform is an object instead of array - fixing. --- docs/Configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Configuration.md b/docs/Configuration.md index bd359377947b..2edb1f7132e9 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1119,7 +1119,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `[{"^.+\\.[jt]sx?$": "babel-jest"}]` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -1134,7 +1134,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform array. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] From 4449f7e1048aeaf2849e3edd7722e9cebbe60710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 2 May 2020 20:01:14 +0200 Subject: [PATCH 6/7] --amend --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38ed4e008219..9f18737254d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) - `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) - `[docs]` Fix example reference implementation to use Jest with Phabricator ([#8662](https://github.com/facebook/jest/pull/8662)) +- `[docs]` Added default compiler to tranform ([#8583](https://github.com/facebook/jest/pull/8583)) ### Performance @@ -383,7 +384,6 @@ - `[docs]` Add example to `jest.mock` for mocking ES6 modules with the `factory` parameter ([#8550](https://github.com/facebook/jest/pull/8550)) - `[docs]` Add information about using `jest.doMock` with ES6 imports ([#8573](https://github.com/facebook/jest/pull/8573)) - `[docs]` Fix variable name in custom-matcher-api code example ([#8582](https://github.com/facebook/jest/pull/8582)) -<<<<<<< HEAD - `[docs]` Fix example used in custom environment docs ([#8617](https://github.com/facebook/jest/pull/8617)) - `[docs]` Updated react tutorial to refer to new package of react-testing-library (@testing-library/react) ([#8753](https://github.com/facebook/jest/pull/8753)) - `[docs]` Updated imports of react-testing-library to @testing-library/react in website ([#8757](https://github.com/facebook/jest/pull/8757)) @@ -395,9 +395,6 @@ - `[*]` Enforce LF line endings ([#8809](https://github.com/facebook/jest/pull/8809)) - `[pretty-format]` Delete obsolete link and simplify structure in README ([#8824](https://github.com/facebook/jest/pull/8824)) - `[docs]` Fix broken transform link on webpack page ([#9155](https://github.com/facebook/jest/pull/9155)) -======= -- `[docs]` Added default compiler to tranform ([#8583](https://github.com/facebook/jest/pull/8583)) ->>>>>>> Updated change log for #8583 ### Performance From f69a0b09f3a5f6bfbb8472b493011a22a66d0d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 2 May 2020 20:02:21 +0200 Subject: [PATCH 7/7] update versioned docs --- website/versioned_docs/version-22.x/Configuration.md | 4 ++-- website/versioned_docs/version-23.x/Configuration.md | 4 ++-- website/versioned_docs/version-24.x/Configuration.md | 4 ++-- website/versioned_docs/version-25.1/Configuration.md | 4 ++-- website/versioned_docs/version-25.3/Configuration.md | 4 ++-- website/versioned_docs/version-25.5/Configuration.md | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/website/versioned_docs/version-22.x/Configuration.md b/website/versioned_docs/version-22.x/Configuration.md index f1be8eb98924..041f4ac17f77 100644 --- a/website/versioned_docs/version-22.x/Configuration.md +++ b/website/versioned_docs/version-22.x/Configuration.md @@ -835,7 +835,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -848,7 +848,7 @@ Examples of such compilers include: _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] diff --git a/website/versioned_docs/version-23.x/Configuration.md b/website/versioned_docs/version-23.x/Configuration.md index 178809f2b84b..9f139dbe56a1 100644 --- a/website/versioned_docs/version-23.x/Configuration.md +++ b/website/versioned_docs/version-23.x/Configuration.md @@ -904,7 +904,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -917,7 +917,7 @@ Examples of such compilers include: _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] diff --git a/website/versioned_docs/version-24.x/Configuration.md b/website/versioned_docs/version-24.x/Configuration.md index ffc940ea66bb..680a60f4977d 100644 --- a/website/versioned_docs/version-24.x/Configuration.md +++ b/website/versioned_docs/version-24.x/Configuration.md @@ -1092,7 +1092,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -1107,7 +1107,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] diff --git a/website/versioned_docs/version-25.1/Configuration.md b/website/versioned_docs/version-25.1/Configuration.md index ea8a7682c213..41af1a1b9b47 100644 --- a/website/versioned_docs/version-25.1/Configuration.md +++ b/website/versioned_docs/version-25.1/Configuration.md @@ -1107,7 +1107,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -1122,7 +1122,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] diff --git a/website/versioned_docs/version-25.3/Configuration.md b/website/versioned_docs/version-25.3/Configuration.md index aebb2597a7c8..3c2a23692126 100644 --- a/website/versioned_docs/version-25.3/Configuration.md +++ b/website/versioned_docs/version-25.3/Configuration.md @@ -1120,7 +1120,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -1135,7 +1135,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] diff --git a/website/versioned_docs/version-25.5/Configuration.md b/website/versioned_docs/version-25.5/Configuration.md index 69e68bae0396..0655b2d4b1eb 100644 --- a/website/versioned_docs/version-25.5/Configuration.md +++ b/website/versioned_docs/version-25.5/Configuration.md @@ -1120,7 +1120,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -1135,7 +1135,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\]