Skip to content

Commit

Permalink
Add moduleNameMapper ordering note to the documentation (#5249)
Browse files Browse the repository at this point in the history
* Add moduleNameMapper ordering note to the documentation

* Add changelog entry
  • Loading branch information
emileber authored and cpojer committed Jan 8, 2018
1 parent 38aec14 commit 105c25e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

* `[docs]` Describe the order of execution of describe and test blocks.
([#5217](https://github.com/facebook/jest/pull/5217), [#5238](https://github.com/facebook/jest/pull/5238))
* `[docs]` Add a note on `moduleNameMapper` ordering. ([#5249](https://github.com/facebook/jest/pull/5249))

## jest 22.0.4

Expand Down
3 changes: 3 additions & 0 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ Example:
}
```

The order in which the mappings are defined matters. Patterns are checked one
by one until one fits. The most specific rule should be listed first.

_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
Expand Down

0 comments on commit 105c25e

Please sign in to comment.