I've got babel-plugin-module-resolver
set up on my project and it works fine, until I run my tests.
I've set up ~/
to point to ./src
.
I've tried adding the following to package.json
but it still does not work
"jest": {
"preset": "react-native",
"moduleNameMapper": {
"~": "./src"
}
}
You could use babel-jest plugin to make jest use babel as a preprocessor.
You can also find an example of this here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With