React test with jest does not honor moduleNameMapper from webpack aliases
问题 I am using jest and enzyme to test my react component. I am also using blueprint icons as one of the dependency in my react component. As part of my webpack config, following is added: config.resolve.alias = { blueprintIcons: path.resolve('./node_modules/@blueprintjs/icons'), blueprint: path.resolve('./node_modules/@blueprintjs/core') }; Following is added as part of jest config: rootDir: '.', roots: [ '<rootDir>/__test__/' ], transformIgnorePatterns: [ '<rootDir>/node_modules/' ], transform: