Jest setup "SyntaxError: Unexpected token export"
I had to add this into my .jestconfig
:
"transformIgnorePatterns": [
"<rootDir>/node_modules/(?!lodash-es)"
]
If none of the other solutions worked for you, you can try this in your jest
"moduleNameMapper": {
"^lodash-es$": "lodash"
}
It will replace lodash-es
with the commonjs version during testing runtime.