0.3.0 • Published 5 years ago

jest-directory-named-resolver v0.3.0

Weekly downloads
1,310
License
MIT
Repository
github
Last release
5 years ago

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": {
  "resolver": "jest-directory-named-resolver"
}

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.