This is my jest configuration from the package.json file:
\"jest\": { \"automock\": false, \"browser\": true, \"moduleNameMapper\": { \"\\\
Jest doesn't handle imports so it needs a transform plugin, and this is why I had to add the plugin:
babel-plugin-dynamic-import-node
and update my babel settings to tell jest to use this plugin to transform the code properly:
"env": { "test": { "plugins" : ["dynamic-import-node"] } }
GitHub thread