How to Find the Jest Cache Folder?

Find out how to locate the Jest cache folder

You can locate the Jest cache folder by using the --showConfig CLI option, for example, like so:

jest --showConfig

This will output your Jest config; the cache directory should be under the cacheDirectory key. You can use the following shortcut to only display the cache directory:

jest --showConfig | grep cacheDir

If Jest is not installed as a global dependency, then you can do the following:

./node_modules/.bin/jest --showConfig | grep cacheDir

If you're using yarn, then you can run the following command:

yarn jest --showConfig | grep cacheDir

Similarly, if you're using npx, you can use the following command:

npx jest --showConfig | grep cacheDir

Hope you found this post useful. It was published . Please show your love and support by sharing this post.