Skip to content

Commit

Permalink
docs: use extra heading level for typescript in getting started (#12475)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 23, 2022
1 parent 01311b3 commit 98341d4
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions docs/GettingStarted.md
Expand Up @@ -124,7 +124,7 @@ Jest can be used in projects that use [parcel-bundler](https://parceljs.org/) to

### Using TypeScript

### Using TypeScript via Babel
#### Via `babel`

Jest supports TypeScript, via Babel. First, make sure you followed the instructions on [using Babel](#using-babel) above. Next, install the `@babel/preset-typescript`:

Expand All @@ -146,11 +146,11 @@ module.exports = {

However, there are some [caveats](https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats) to using TypeScript with Babel. Because TypeScript support in Babel is purely transpilation, Jest will not type-check your tests as they are run. If you want that, you can use [ts-jest](https://github.com/kulshekhar/ts-jest) instead, or just run the TypeScript compiler [tsc](https://www.typescriptlang.org/docs/handbook/compiler-options.html) separately (or as part of your build process).

### Using TypeScript via ts-jest
#### Via `ts-jest`

[ts-jest](https://github.com/kulshekhar/ts-jest) is a TypeScript preprocessor with source map support for Jest that lets you use Jest to test projects written in TypeScript.

### Using TypeScript: type definitions
#### Type definitions

You may also want to install the [`@types/jest`](https://www.npmjs.com/package/@types/jest) module for the version of Jest you're using. This will help provide full typing when writing your tests with TypeScript.

Expand Down
8 changes: 4 additions & 4 deletions website/versioned_docs/version-25.x/GettingStarted.md
Expand Up @@ -132,7 +132,7 @@ Jest can be used in projects that use [parcel-bundler](https://parceljs.org/) to

### Using TypeScript

### Using TypeScript via Babel
#### Via `babel`

Jest supports TypeScript, via Babel. First, make sure you followed the instructions on [using Babel](#using-babel) above. Next, install the `@babel/preset-typescript` via `yarn`:

Expand All @@ -142,7 +142,7 @@ yarn add --dev @babel/preset-typescript

Then add `@babel/preset-typescript` to the list of presets in your `babel.config.js`.

```js title="babel.config.js"
```javascript title="babel.config.js"
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
Expand All @@ -154,11 +154,11 @@ module.exports = {

However, there are some [caveats](https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats) to using TypeScript with Babel. Because TypeScript support in Babel is purely transpilation, Jest will not type-check your tests as they are run. If you want that, you can use [ts-jest](https://github.com/kulshekhar/ts-jest) instead, or just run the TypeScript compiler [tsc](https://www.typescriptlang.org/docs/handbook/compiler-options.html) separately (or as part of your build process).

### Using TypeScript via ts-jest
#### Via `ts-jest`

[ts-jest](https://github.com/kulshekhar/ts-jest) is a TypeScript preprocessor with source map support for Jest that lets you use Jest to test projects written in TypeScript.

### Using TypeScript: type definitions
#### Type definitions

You may also want to install the [`@types/jest`](https://www.npmjs.com/package/@types/jest) module for the version of Jest you're using. This will help provide full typing when writing your tests with TypeScript.

Expand Down
6 changes: 3 additions & 3 deletions website/versioned_docs/version-26.x/GettingStarted.md
Expand Up @@ -132,7 +132,7 @@ Jest can be used in projects that use [parcel-bundler](https://parceljs.org/) to

### Using TypeScript

### Using TypeScript via Babel
#### Via `babel`

Jest supports TypeScript, via Babel. First, make sure you followed the instructions on [using Babel](#using-babel) above. Next, install the `@babel/preset-typescript` via `yarn`:

Expand All @@ -142,7 +142,7 @@ yarn add --dev @babel/preset-typescript

Then add `@babel/preset-typescript` to the list of presets in your `babel.config.js`.

```js title="babel.config.js"
```javascript title="babel.config.js"
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
Expand All @@ -154,7 +154,7 @@ module.exports = {

However, there are some [caveats](https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats) to using TypeScript with Babel. Because TypeScript support in Babel is purely transpilation, Jest will not type-check your tests as they are run. If you want that, you can use [ts-jest](https://github.com/kulshekhar/ts-jest) instead, or just run the TypeScript compiler [tsc](https://www.typescriptlang.org/docs/handbook/compiler-options.html) separately (or as part of your build process).

### Using TypeScript via ts-jest
#### Via `ts-jest`

[ts-jest](https://github.com/kulshekhar/ts-jest) is a TypeScript preprocessor with source map support for Jest that lets you use Jest to test projects written in TypeScript.

Expand Down
8 changes: 4 additions & 4 deletions website/versioned_docs/version-27.0/GettingStarted.md
Expand Up @@ -132,7 +132,7 @@ Jest can be used in projects that use [parcel-bundler](https://parceljs.org/) to

### Using TypeScript

### Using TypeScript via Babel
#### Via `babel`

Jest supports TypeScript, via Babel. First, make sure you followed the instructions on [using Babel](#using-babel) above. Next, install the `@babel/preset-typescript` via `yarn`:

Expand All @@ -142,7 +142,7 @@ yarn add --dev @babel/preset-typescript

Then add `@babel/preset-typescript` to the list of presets in your `babel.config.js`.

```js title="babel.config.js"
```javascript title="babel.config.js"
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
Expand All @@ -154,11 +154,11 @@ module.exports = {

However, there are some [caveats](https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats) to using TypeScript with Babel. Because TypeScript support in Babel is purely transpilation, Jest will not type-check your tests as they are run. If you want that, you can use [ts-jest](https://github.com/kulshekhar/ts-jest) instead, or just run the TypeScript compiler [tsc](https://www.typescriptlang.org/docs/handbook/compiler-options.html) separately (or as part of your build process).

### Using TypeScript via ts-jest
#### Via `ts-jest`

[ts-jest](https://github.com/kulshekhar/ts-jest) is a TypeScript preprocessor with source map support for Jest that lets you use Jest to test projects written in TypeScript.

### Using TypeScript: type definitions
#### Type definitions

You may also want to install the [`@types/jest`](https://www.npmjs.com/package/@types/jest) module for the version of Jest you're using. This will help provide full typing when writing your tests with TypeScript.

Expand Down
8 changes: 4 additions & 4 deletions website/versioned_docs/version-27.1/GettingStarted.md
Expand Up @@ -132,7 +132,7 @@ Jest can be used in projects that use [parcel-bundler](https://parceljs.org/) to

### Using TypeScript

### Using TypeScript via Babel
#### Via `babel`

Jest supports TypeScript, via Babel. First, make sure you followed the instructions on [using Babel](#using-babel) above. Next, install the `@babel/preset-typescript` via `yarn`:

Expand All @@ -142,7 +142,7 @@ yarn add --dev @babel/preset-typescript

Then add `@babel/preset-typescript` to the list of presets in your `babel.config.js`.

```js title="babel.config.js"
```javascript title="babel.config.js"
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
Expand All @@ -154,11 +154,11 @@ module.exports = {

However, there are some [caveats](https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats) to using TypeScript with Babel. Because TypeScript support in Babel is purely transpilation, Jest will not type-check your tests as they are run. If you want that, you can use [ts-jest](https://github.com/kulshekhar/ts-jest) instead, or just run the TypeScript compiler [tsc](https://www.typescriptlang.org/docs/handbook/compiler-options.html) separately (or as part of your build process).

### Using TypeScript via ts-jest
#### Via `ts-jest`

[ts-jest](https://github.com/kulshekhar/ts-jest) is a TypeScript preprocessor with source map support for Jest that lets you use Jest to test projects written in TypeScript.

### Using TypeScript: type definitions
#### Type definitions

You may also want to install the [`@types/jest`](https://www.npmjs.com/package/@types/jest) module for the version of Jest you're using. This will help provide full typing when writing your tests with TypeScript.

Expand Down
8 changes: 4 additions & 4 deletions website/versioned_docs/version-27.2/GettingStarted.md
Expand Up @@ -132,7 +132,7 @@ Jest can be used in projects that use [parcel-bundler](https://parceljs.org/) to

### Using TypeScript

### Using TypeScript via Babel
#### Via `babel`

Jest supports TypeScript, via Babel. First, make sure you followed the instructions on [using Babel](#using-babel) above. Next, install the `@babel/preset-typescript` via `yarn`:

Expand All @@ -142,7 +142,7 @@ yarn add --dev @babel/preset-typescript

Then add `@babel/preset-typescript` to the list of presets in your `babel.config.js`.

```js title="babel.config.js"
```javascript title="babel.config.js"
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
Expand All @@ -154,11 +154,11 @@ module.exports = {

However, there are some [caveats](https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats) to using TypeScript with Babel. Because TypeScript support in Babel is purely transpilation, Jest will not type-check your tests as they are run. If you want that, you can use [ts-jest](https://github.com/kulshekhar/ts-jest) instead, or just run the TypeScript compiler [tsc](https://www.typescriptlang.org/docs/handbook/compiler-options.html) separately (or as part of your build process).

### Using TypeScript via ts-jest
#### Via `ts-jest`

[ts-jest](https://github.com/kulshekhar/ts-jest) is a TypeScript preprocessor with source map support for Jest that lets you use Jest to test projects written in TypeScript.

### Using TypeScript: type definitions
#### Type definitions

You may also want to install the [`@types/jest`](https://www.npmjs.com/package/@types/jest) module for the version of Jest you're using. This will help provide full typing when writing your tests with TypeScript.

Expand Down

0 comments on commit 98341d4

Please sign in to comment.