My unit tests for my React project pass perfectly fine on local but fail on Jenkins. I get this error message on Jenkins:
Error: Cannot find module '../../../../src/components/Sidebar/MenuList.jsx'
The file does exist and is imported in my test file like so:
import { MenuList } from '../../../../src/components/Sidebar/MenuList.jsx';
And exported in my MenuList.jsx file:
export class MenuList extends Component { ... }
I am using Mocha/Enzyme/Sinon for testing + Istanbul for coverage.