Skip to content

Commit

Permalink
Escape angle brackets in configuration
Browse files Browse the repository at this point in the history
Github markdown treats anything within angle brackets as an HTML tag. Due to this, data types such as `[array\<string>]` get rendered as `[array<string>]`. Many of the links are broken because of this because docusaurus doesn't read the hidden HTML tag.
  • Loading branch information
ayush000 committed Nov 15, 2019
1 parent 18dfcbb commit 79d4c25
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions docs/Configuration.md
Expand Up @@ -177,15 +177,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 @@ -317,7 +317,7 @@ Default: `false`

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

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

Default: `undefined`

Expand All @@ -334,7 +334,7 @@ For example, if your tests call `Math` often, you can pass it by setting `extraG
}
```

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

Default: `['']`

Expand Down Expand Up @@ -434,21 +434,21 @@ Default: `5`

A number limiting the number of tests that are allowed to run at the same time when using `test.concurrent`. Any test above this limit will be queued and executed once a slot is released.

### `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", "ts", "tsx", "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.

We recommend placing the extensions most commonly used in your project on the left, so if you are using TypeScript, you may want to consider moving "ts" and/or "tsx" to the beginning of the array.

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

Default: `null`

Expand Down Expand Up @@ -476,15 +476,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 @@ -539,7 +539,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 @@ -572,7 +572,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 @@ -695,7 +695,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 @@ -794,7 +794,7 @@ module.exports = {
};
```

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

Default: `[]`

Expand Down Expand Up @@ -942,29 +942,29 @@ 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__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)" ]`)

The glob patterns Jest uses to detect test files. By default it looks for `.js`, `.jsx`, `.ts` and `.tsx` 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 the [micromatch](https://github.com/jonschlinkert/micromatch) package for details of the patterns you can specify.

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

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

Default: `["/node_modules/"]`

An array of regexp pattern strings that are matched against all test paths before executing the test. If the test path matches any of the patterns, it 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/"]`.

### `testRegex` [string | array<string>]
### `testRegex` [string | array\<string>]

Default: `(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$`

The pattern or patterns Jest uses to detect test files. By default it looks for `.js`, `.jsx`, `.ts` and `.tsx` 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 or patterns Jest uses to detect test files. By default it looks for `.js`, `.jsx`, `.ts` and `.tsx` 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 @@ -1085,7 +1085,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, pathToTransformer | [pathToTransformer, object]>]
### `transform` [object\<string, pathToTransformer | [pathToTransformer, object]>]

Default: `undefined`

Expand All @@ -1099,7 +1099,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 @@ -1111,7 +1111,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 @@ -1127,15 +1127,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

0 comments on commit 79d4c25

Please sign in to comment.