Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add moduleNameMapper ordering note to the documentation #5249

Merged
merged 2 commits into from
Jan 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,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