-
Notifications
You must be signed in to change notification settings - Fork 377
Closed
Description
Hi
After add the react-table for the VirtualScroll in kiali we have a problem with lodash-es library imported in react-table.
Why react-table use lodash-es instead lodash like react-charts?
This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
Here's what you can do:
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/en/configuration.html
Details:
/home/aljesusg/Projects/kiali/kiali-ui/node_modules/@patternfly/react-table/node_modules/lodash-es/lodash.js:10
export { default as add } from './add.js';
^^^^^^
SyntaxError: Unexpected token export
at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:471:17)
at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:513:25)
at Object.<anonymous> (node_modules/@patternfly/react-table/dist/js/components/Table/base/evaluate-transforms.js:8:17)Thanks
Metadata
Metadata
Assignees
Labels
No labels