Skip to content

Commit

Permalink
Escape angle brackets in configuration page of versioned docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ayush000 committed Nov 17, 2019
1 parent 79d4c25 commit cb5bd44
Show file tree
Hide file tree
Showing 7 changed files with 154 additions and 154 deletions.
38 changes: 19 additions & 19 deletions website/versioned_docs/version-22.x/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ Default: `undefined`

The directory where Jest should output its coverage files.

### `coveragePathIgnorePatterns` [array<string>]
### `coveragePathIgnorePatterns` [array\<string>]

Default: `["/node_modules/"]`

An array of regexp pattern strings that are matched against all file paths before executing the test. If the file path matches any of the patterns, coverage information will be skipped.

These pattern strings match against the full path. Use the `<rootDir>` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["<rootDir>/build/", "<rootDir>/node_modules/"]`.

### `coverageReporters` [array<string>]
### `coverageReporters` [array\<string>]

Default: `["json", "lcov", "text", "clover"]`

Expand Down Expand Up @@ -226,7 +226,7 @@ default: `undefined`

Allows for a label to be printed along side a test while it is running. This becomes more useful in multiproject repositories where there can be many jest configuration files. This visually tells which project a test belongs to.

### `forceCoverageMatch` [array<string>]
### `forceCoverageMatch` [array\<string>]

Default: `['']`

Expand Down Expand Up @@ -292,21 +292,21 @@ Default: `undefined`

This option allows the use of a custom global teardown module which exports an async function that is triggered once after all test suites.

### `moduleFileExtensions` [array<string>]
### `moduleFileExtensions` [array\<string>]

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleDirectories` [array<string>]
### `moduleDirectories` [array\<string>]

Default: `["node_modules"]`

An array of directory names to be searched recursively up from the requiring module's location. Setting this option will _override_ the default, if you wish to still search `node_modules` for packages include it along with any other options: `["node_modules", "bower_components"]`

### `moduleNameMapper` [object<string, string>]
### `moduleNameMapper` [object\<string, string>]

Default: `null`

Expand Down Expand Up @@ -334,15 +334,15 @@ The order in which the mappings are defined matters. Patterns are checked one by

_Note: If you provide module name without boundaries `^$` it may cause hard to spot errors. E.g. `relay` will replace all modules which contain `relay` as a substring in its name: `relay`, `react-relay` and `graphql-relay` will all be pointed to your stub._

### `modulePathIgnorePatterns` [array<string>]
### `modulePathIgnorePatterns` [array\<string>]

Default: `[]`

An array of regexp pattern strings that are matched against all module paths before those paths are to be considered 'visible' to the module loader. If a given module's path matches any of the patterns, it will not be `require()`-able in the test environment.

These pattern strings match against the full path. Use the `<rootDir>` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["<rootDir>/build/"]`.

### `modulePaths` [array<string>]
### `modulePaths` [array\<string>]

Default: `[]`

Expand Down Expand Up @@ -375,7 +375,7 @@ Default: `undefined`

A preset that is used as a base for Jest's configuration. A preset should point to an npm module that exports a `jest-preset.json` module on its top level.

### `projects` [array<string | ProjectConfig>]
### `projects` [array\<string | ProjectConfig>]

Default: `undefined`

Expand Down Expand Up @@ -414,7 +414,7 @@ Default: `false`

Automatically clear mock calls and instances between every test. Equivalent to calling `jest.clearAllMocks()` between each test. This does not remove any mock implementation that may have been provided.

### `reporters` [array<moduleName | [moduleName, options]>]
### `reporters` [array\<moduleName | [moduleName, options]>]

Default: `undefined`

Expand Down Expand Up @@ -533,7 +533,7 @@ Oftentimes, you'll want to set this to `'src'` or `'lib'`, corresponding to wher

_Note that using `'<rootDir>'` as a string token in any other path-based config settings will refer back to this value. So, for example, if you want your [`setupFiles`](#setupfiles-array) config entry to point at the `env-setup.js` file at the root of your project, you could set its value to `["<rootDir>/env-setup.js"]`._

### `roots` [array<string>]
### `roots` [array\<string>]

Default: `["<rootDir>"]`

Expand Down Expand Up @@ -585,7 +585,7 @@ The path to a module that runs some code to configure or set up the testing fram

For example, Jest ships with several plug-ins to `jasmine` that work by monkey-patching the jasmine API. If you wanted to add even more jasmine plugins to the mix (or if you wanted some custom, project-wide matchers for example), you could do so in this module.

### `snapshotSerializers` [array<string>]
### `snapshotSerializers` [array\<string>]

Default: `[]`

Expand Down Expand Up @@ -716,7 +716,7 @@ Default: `{}`

Test environment options that will be passed to the `testEnvironment`. The relevant options depend on the environment. For example you can override options given to [jsdom](https://github.com/tmpvar/jsdom) such as `{userAgent: "Agent/007"}`.

### `testMatch` [array<string>]
### `testMatch` [array\<string>]

(default: `[ '**/__tests__/**/*.js?(x)', '**/?(*.)(spec|test).js?(x)' ]`)

Expand All @@ -726,7 +726,7 @@ See the [micromatch](https://github.com/jonschlinkert/micromatch) package for de

See also [`testRegex` [string]](#testregex-string), but note that you cannot specify both options.

### `testPathIgnorePatterns` [array<string>]
### `testPathIgnorePatterns` [array\<string>]

Default: `["/node_modules/"]`

Expand All @@ -738,7 +738,7 @@ These pattern strings match against the full path. Use the `<rootDir>` string to

Default: `(/__tests__/.*|(\\.|/)(test|spec))\\.jsx?$`

The pattern Jest uses to detect test files. By default it looks for `.js` and `.jsx` files inside of `__tests__` folders, as well as any files with a suffix of `.test` or `.spec` (e.g. `Component.test.js` or `Component.spec.js`). It will also find files called `test.js` or `spec.js`. See also [`testMatch` [array<string>]](#testmatch-array-string), but note that you cannot specify both options.
The pattern Jest uses to detect test files. By default it looks for `.js` and `.jsx` files inside of `__tests__` folders, as well as any files with a suffix of `.test` or `.spec` (e.g. `Component.test.js` or `Component.spec.js`). It will also find files called `test.js` or `spec.js`. See also [`testMatch` [array\<string>]](#testmatch-array-string), but note that you cannot specify both options.

The following is a visualization of the default regex:

Expand Down Expand Up @@ -830,7 +830,7 @@ Default: `real`

Setting this value to `fake` allows the use of fake timers for functions such as `setTimeout`. Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test.

### `transform` [object<string, string>]
### `transform` [object\<string, string>]

Default: `undefined`

Expand All @@ -842,7 +842,7 @@ _Note: a transformer is only run once per file unless the file has changed. Duri

_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)_

### `transformIgnorePatterns` [array<string>]
### `transformIgnorePatterns` [array\<string>]

Default: `["/node_modules/"]`

Expand All @@ -854,7 +854,7 @@ Example: `["<rootDir>/bower_components/", "<rootDir>/node_modules/"]`.

Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](https://jestjs.io/docs/en/tutorial-react-native.html#transformignorepatterns-customization).

### `unmockedModulePathPatterns` [array<string>]
### `unmockedModulePathPatterns` [array\<string>]

Default: `[]`

Expand All @@ -870,7 +870,7 @@ Default: `false`

Indicates whether each individual test should be reported during the run. All errors will also still be shown on the bottom after execution.

### `watchPathIgnorePatterns` [array<string>]
### `watchPathIgnorePatterns` [array\<string>]

Default: `[]`

Expand Down
40 changes: 20 additions & 20 deletions website/versioned_docs/version-23.x/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ Default: `undefined`

The directory where Jest should output its coverage files.

### `coveragePathIgnorePatterns` [array<string>]
### `coveragePathIgnorePatterns` [array\<string>]

Default: `["/node_modules/"]`

An array of regexp pattern strings that are matched against all file paths before executing the test. If the file path matches any of the patterns, coverage information will be skipped.

These pattern strings match against the full path. Use the `<rootDir>` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["<rootDir>/build/", "<rootDir>/node_modules/"]`.

### `coverageReporters` [array<string>]
### `coverageReporters` [array\<string>]

Default: `["json", "lcov", "text", "clover"]`

Expand Down Expand Up @@ -270,7 +270,7 @@ Default: `false`

Make calling deprecated APIs throw helpful error messages. Useful for easing the upgrade process.

### `forceCoverageMatch` [array<string>]
### `forceCoverageMatch` [array\<string>]

Default: `['']`

Expand Down Expand Up @@ -336,21 +336,21 @@ Default: `undefined`

This option allows the use of a custom global teardown module which exports an async function that is triggered once after all test suites. This function gets Jest's `globalConfig` object as a parameter.

### `moduleDirectories` [array<string>]
### `moduleDirectories` [array\<string>]

Default: `["node_modules"]`

An array of directory names to be searched recursively up from the requiring module's location. Setting this option will _override_ the default, if you wish to still search `node_modules` for packages include it along with any other options: `["node_modules", "bower_components"]`

### `moduleFileExtensions` [array<string>]
### `moduleFileExtensions` [array\<string>]

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleNameMapper` [object<string, string>]
### `moduleNameMapper` [object\<string, string>]

Default: `null`

Expand Down Expand Up @@ -378,15 +378,15 @@ The order in which the mappings are defined matters. Patterns are checked one by

_Note: If you provide module name without boundaries `^$` it may cause hard to spot errors. E.g. `relay` will replace all modules which contain `relay` as a substring in its name: `relay`, `react-relay` and `graphql-relay` will all be pointed to your stub._

### `modulePathIgnorePatterns` [array<string>]
### `modulePathIgnorePatterns` [array\<string>]

Default: `[]`

An array of regexp pattern strings that are matched against all module paths before those paths are to be considered 'visible' to the module loader. If a given module's path matches any of the patterns, it will not be `require()`-able in the test environment.

These pattern strings match against the full path. Use the `<rootDir>` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["<rootDir>/build/"]`.

### `modulePaths` [array<string>]
### `modulePaths` [array\<string>]

Default: `[]`

Expand Down Expand Up @@ -441,7 +441,7 @@ Default: `'prettier'`

Sets the path to the [`prettier`](https://prettier.io/) node module used to update inline snapshots.

### `projects` [array<string | ProjectConfig>]
### `projects` [array\<string | ProjectConfig>]

Default: `undefined`

Expand Down Expand Up @@ -474,7 +474,7 @@ The projects feature can also be used to run multiple configurations or multiple

_Note: When using multi project runner, it's recommended to add a `displayName` for each project. This will show the `displayName` of a project next to its tests._

### `reporters` [array<moduleName | [moduleName, options]>]
### `reporters` [array\<moduleName | [moduleName, options]>]

Default: `undefined`

Expand Down Expand Up @@ -593,7 +593,7 @@ Oftentimes, you'll want to set this to `'src'` or `'lib'`, corresponding to wher

_Note that using `'<rootDir>'` as a string token in any other path-based config settings will refer back to this value. So, for example, if you want your [`setupFiles`](#setupfiles-array) config entry to point at the `env-setup.js` file at the root of your project, you could set its value to `["<rootDir>/env-setup.js"]`._

### `roots` [array<string>]
### `roots` [array\<string>]

Default: `["<rootDir>"]`

Expand Down Expand Up @@ -649,7 +649,7 @@ If you want this path to be [relative to the root directory of your project](#ro

For example, Jest ships with several plug-ins to `jasmine` that work by monkey-patching the jasmine API. If you wanted to add even more jasmine plugins to the mix (or if you wanted some custom, project-wide matchers for example), you could do so in this module.

### `snapshotSerializers` [array<string>]
### `snapshotSerializers` [array\<string>]

Default: `[]`

Expand Down Expand Up @@ -782,7 +782,7 @@ Default: `{}`

Test environment options that will be passed to the `testEnvironment`. The relevant options depend on the environment. For example you can override options given to [jsdom](https://github.com/tmpvar/jsdom) such as `{userAgent: "Agent/007"}`.

### `testMatch` [array<string>]
### `testMatch` [array\<string>]

(default: `[ "**/__tests__/**/*.js?(x)", "**/?(*.)+(spec|test).js?(x)" ]`)

Expand All @@ -792,7 +792,7 @@ See the [micromatch](https://github.com/jonschlinkert/micromatch) package for de

See also [`testRegex` [string]](#testregex-string), but note that you cannot specify both options.

### `testPathIgnorePatterns` [array<string>]
### `testPathIgnorePatterns` [array\<string>]

Default: `["/node_modules/"]`

Expand All @@ -804,7 +804,7 @@ These pattern strings match against the full path. Use the `<rootDir>` string to

Default: `(/__tests__/.*|(\\.|/)(test|spec))\\.jsx?$`

The pattern Jest uses to detect test files. By default it looks for `.js` and `.jsx` files inside of `__tests__` folders, as well as any files with a suffix of `.test` or `.spec` (e.g. `Component.test.js` or `Component.spec.js`). It will also find files called `test.js` or `spec.js`. See also [`testMatch` [array<string>]](#testmatch-array-string), but note that you cannot specify both options.
The pattern Jest uses to detect test files. By default it looks for `.js` and `.jsx` files inside of `__tests__` folders, as well as any files with a suffix of `.test` or `.spec` (e.g. `Component.test.js` or `Component.spec.js`). It will also find files called `test.js` or `spec.js`. See also [`testMatch` [array\<string>]](#testmatch-array-string), but note that you cannot specify both options.

The following is a visualization of the default regex:

Expand Down Expand Up @@ -899,7 +899,7 @@ Default: `real`

Setting this value to `fake` allows the use of fake timers for functions such as `setTimeout`. Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test.

### `transform` [object<string, string>]
### `transform` [object\<string, string>]

Default: `undefined`

Expand All @@ -911,7 +911,7 @@ _Note: a transformer is only run once per file unless the file has changed. Duri

_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)_

### `transformIgnorePatterns` [array<string>]
### `transformIgnorePatterns` [array\<string>]

Default: `["/node_modules/"]`

Expand All @@ -923,7 +923,7 @@ Example: `["<rootDir>/bower_components/", "<rootDir>/node_modules/"]`.

Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](https://jestjs.io/docs/en/tutorial-react-native#transformignorepatterns-customization).

### `unmockedModulePathPatterns` [array<string>]
### `unmockedModulePathPatterns` [array\<string>]

Default: `[]`

Expand All @@ -939,15 +939,15 @@ Default: `false`

Indicates whether each individual test should be reported during the run. All errors will also still be shown on the bottom after execution.

### `watchPathIgnorePatterns` [array<string>]
### `watchPathIgnorePatterns` [array\<string>]

Default: `[]`

An array of RegExp patterns that are matched against all source file paths before re-running tests in watch mode. If the file path matches any of the patterns, when it is updated, it will not trigger a re-run of tests.

These patterns match against the full path. Use the `<rootDir>` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["<rootDir>/node_modules/"]`.

### `watchPlugins` [array<string | [string, Object]>]
### `watchPlugins` [array\<string | [string, Object]>]

Default: `[]`

Expand Down
Loading

0 comments on commit cb5bd44

Please sign in to comment.