I am trying to pass along a configuration file to Jest in order to run tests only from a given directory.
According to documentation, you can use config.testPathDi
config.testPathDi
For JEST V20+:
{ "roots": ["__tests__/"] }
For v 20-, you will get following warning if you use testPathDirs:
Deprecation Warning:
Option "testPathDirs" was replaced by "roots". Jest now treats your current configuration as: { "roots": ["tests/unit/"] } Please update your configuration.
Option "testPathDirs" was replaced by "roots".
Jest now treats your current configuration as: { "roots": ["tests/unit/"] }
Please update your configuration.