Skip to content

Commit

Permalink
chore(release): 26.5.1 (#2343)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl committed Feb 9, 2021
1 parent 1a3058f commit 6cc48ce
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,13 @@
## [26.5.1](https://github.com/kulshekhar/ts-jest/compare/v26.5.0...v26.5.1) (2021-02-09)


### Features

* **config:** support typed config options for jest config typescript ([#2336](https://github.com/kulshekhar/ts-jest/issues/2336)) ([f4f5d32](https://github.com/kulshekhar/ts-jest/commit/f4f5d3205d1c80e545a32c02c6a66e7e91386f7f))
* **presets:** add typing for `presets` entry point ([#2341](https://github.com/kulshekhar/ts-jest/issues/2341)) ([e12b004](https://github.com/kulshekhar/ts-jest/commit/e12b004dcc5848d5ae0638e885147c54e11cc72b)), closes [#2325](https://github.com/kulshekhar/ts-jest/issues/2325)



# [27.0.0-next.5](https://github.com/kulshekhar/ts-jest/compare/v27.0.0-next.4...v27.0.0-next.5) (2021-02-04)


Expand Down
Expand Up @@ -41,8 +41,7 @@ module.exports = {
To utilize IDE suggestions, you can use `JSDoc` comments to provide suggested `ts-jest` configs for your Jest config:

```js
/** @typedef {import('ts-jest/dist/types')} */
/** @type {import('@jest/types').Config.InitialOptions} */
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = config = {
// [...]
globals: {
Expand Down
22 changes: 20 additions & 2 deletions website/versioned_docs/version-26.5/getting-started/presets.md
Expand Up @@ -50,8 +50,8 @@ In this case you'll need to use the JavaScript version of Jest config (comment/u
```js
// jest.config.js
const { defaults: tsjPreset } = require('ts-jest/presets')
// const { jsWithTs: tsjPreset } = require('ts-jest/presets');
// const { jsWithBabel: tsjPreset } = require('ts-jest/presets');
// const { jsWithTs: tsjPreset } = require('ts-jest/presets')
// const { jsWithBabel: tsjPreset } = require('ts-jest/presets')

module.exports = {
// [...]
Expand All @@ -61,3 +61,21 @@ module.exports = {
},
}
```

Or through TypeScript (if `ts-node` is installed):

```ts
// jest.config.ts
import type { InitialOptionsTsJest } from 'ts-jest/dist/types'
import { defaults as tsjPreset } from 'ts-jest/preset'
// import { jsWithTs as tsjPreset } from 'ts-jest/preset'
// import { jsWithBabel as tsjPreset } from 'ts-jest/preset'
const config: InitialOptionsTsJest = {
// [...]
transform: {
...tsjPreset.transform,
// [...]
},
}
export default config
```

0 comments on commit 6cc48ce

Please sign in to comment.