mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-11 10:03:51 +00:00
Fixed jest config to transform react-chartjs-2 lib
This commit is contained in:
@@ -26,13 +26,14 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
transformIgnorePatterns: [
|
transformIgnorePatterns: [
|
||||||
'<rootDir>/.stryker-tmp',
|
'<rootDir>/.stryker-tmp',
|
||||||
'/node_modules\\/(?!react-leaflet)\.(js|jsx|ts|tsx)$',
|
'node_modules\/(?!(\@react-leaflet|react-leaflet|leaflet|react-chartjs-2)\/)',
|
||||||
'^.+\\.module\\.scss$',
|
'^.+\\.module\\.scss$',
|
||||||
],
|
],
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'^.+\\.module\\.scss$': 'identity-obj-proxy',
|
'^.+\\.module\\.scss$': 'identity-obj-proxy',
|
||||||
// Reactstrap module resolution does not work in jest for some reason. Manually mapping it solves the problem
|
// Reactstrap module resolution does not work in jest for some reason. Manually mapping it solves the problem
|
||||||
'reactstrap': '<rootDir>/node_modules/reactstrap/dist/reactstrap.umd.js',
|
'reactstrap': '<rootDir>/node_modules/reactstrap/dist/reactstrap.umd.js',
|
||||||
|
'react-chartjs-2': '<rootDir>/node_modules/react-chartjs-2/dist/index.js',
|
||||||
},
|
},
|
||||||
moduleFileExtensions: ['js', 'ts', 'tsx', 'json'],
|
moduleFileExtensions: ['js', 'ts', 'tsx', 'json'],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user