I\'m using the code splitting feature of webpack, but it seems that jest doesn\'t recognize the import() function:
import()
import(\'myModule\').
Oh I just found the answer.
Simply install this plugin: https://github.com/airbnb/babel-plugin-dynamic-import-node and add it to the .babelrc file:
.babelrc
{ ... "env": { "test": { "plugins": ["dynamic-import-node"] } } }