You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user/config/index.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,12 @@ The later is preferred since it's more customizable, but it depends on your need
8
8
9
9
### The 3 presets
10
10
11
-
`ts-jest` comes with 3 presets, allowing to cover most of project's base configuration:
11
+
`ts-jest` comes with 3 presets, covering most of project's base configuration:
12
12
13
13
| Preset name | Description |
14
14
|---|---|
15
15
|`ts-jest/presets/default`<br>or `ts-jest`|`ts-jest` will take care of `.ts` and `.tsx` files only, leaving JavaScript files as-is. |
16
-
|`ts-jest/presets/js-with-ts`| TypeScript and JavaScript file (`.ts`, `.tsx`, `.js` and `.jsx`) will be handled by `ts-jest` (and so TypeScript).<br>You'll need to set `allowJs` to `true` in your `tsconfig.json` file. |
16
+
|`ts-jest/presets/js-with-ts`| TypeScript and JavaScript file (`.ts`, `.tsx`, `.js` and `.jsx`) will be handled by `ts-jest`.<br>You'll need to set `allowJs` to `true` in your `tsconfig.json` file. |
17
17
|`ts-jest/presets/js-with-babel`| TypeScript files will be handled by `ts-jest`, and JavaScript files will be handled by `babel-jest`. |
18
18
19
19
### Basic usage
@@ -48,12 +48,12 @@ module.exports = {
48
48
49
49
</div></div>
50
50
51
-
**Note:** presets are using `testMatch`, as Jest's does in its defaults. If you want to use `testRegex` instead in your configuration, you MUST set `testMatch` to `null` or Jest will bail.
51
+
**Note:** presets use `testMatch`, like Jest does in its defaults. If you want to use `testRegex` instead in your configuration, you MUST set `testMatch` to `null` or Jest will bail.
52
52
53
53
### Advanced
54
54
55
55
Any preset can also be used with other options.
56
-
If you're already using another preset, you might want only some specific settings from the `ts-jest` chosen preset.
56
+
If you're already using another preset, you might want only some specific settings from the chosen `ts-jest` preset.
57
57
In this case you'll need to use the JavaScript version of Jest config:
0 commit comments