Skip to content

Commit 653ebac

Browse files
bryanculveroklas
andauthored
Fix #95: Address Jest moduleDirectories Behavior (#96)
* Fix #95: Address Jest moduleDirectories Behavior - Use Jest default for moduleDirectories of ['node_modules'] instead of [] when not overridden - Use a relative path for appPath modules instead of full path which seems to be preferred for Jest * chore: update some deps in yarn.lock #95 * Revert relative path change. --------- Co-authored-by: Serguei Okladnikov <oklaspec@gmail.com>
1 parent b8c5da9 commit 653ebac

File tree

2 files changed

+2667
-2240
lines changed

2 files changed

+2667
-2240
lines changed

packages/react-app-alias-ex/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function aliasJest(options) {
121121
return {
122122
...expanded,
123123
moduleDirectories: [
124-
...(config.moduleDirectories || []),
124+
...(config.moduleDirectories || ['node_modules']),
125125
path.resolve(paths.appPath, 'node_modules')
126126
],
127127
}

0 commit comments

Comments
 (0)