jest-directory-named-resolver
Allow Jest require paths to look for files that match the directory name when trying to resolve. For use with directory-named-webpack-plugin.
Install and Configure
Install the package:
yarn add jsonnull/jest-directory-named-resolver
Configure Jest to use the custom resolver:
"jest":
See the resolver
option
from the Jest documentation.
NOTE: Custom resolvers are not yet in a published Jest release, so in order to use this you will need to run your tests off a local build of Jest. See the Jest CONTRIBUTING.md for information on how to test using a local build.