From 2fe109bee058697bdc496ebd24cd225232d047cf Mon Sep 17 00:00:00 2001 From: Ran Yitzhaki Date: Sat, 18 Aug 2018 22:15:59 +0300 Subject: [PATCH] improve preset documentation (#6864) * improve preset documentation * update changelog --- CHANGELOG.md | 6 ++---- docs/Configuration.md | 10 +++++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23e5049cfa91..31626c2f238b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,14 +3,12 @@ ### Fixes - `[jest-cli]` Fix incorrect `testEnvironmentOptions` warning ([#6852](https://github.com/facebook/jest/pull/6852)) +- `[jest-each`] Prevent done callback being supplied to describe ([#6843](https://github.com/facebook/jest/pull/6843)) ### Chore & Maintenance - `[docs]` Add custom toMatchSnapshot matcher docs ([#6837](https://github.com/facebook/jest/pull/6837)) - -### Fixes - -- `[jest-each`] Prevent done callback being supplied to describe ([#6843](https://github.com/facebook/jest/pull/6843)) +- `[docs]` Improve the documentation regarding preset configuration ([#6864](https://github.com/facebook/jest/issues/6864)) ## 23.5.0 diff --git a/docs/Configuration.md b/docs/Configuration.md index 9513d3cc9422..07adbcb4a016 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -410,7 +410,15 @@ Specifies notification mode. Requires `notify: true`. 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` or `jest-preset.js` module at its top level. +A preset that is used as a base for Jest's configuration. A preset should point to an npm module that has a `jest-preset.json` or `jest-preset.js` file at the root. + +For example, this preset `foo-bar/jest-preset.js` will be configured as follows: + +```json +{ + "preset": "foo-bar" +} +``` Presets may also be relative filesystem paths.