transformIgnorePatterns not working correctly in jest config

231 Views Asked by At

I am getting "Jest encountered an unexpected token" jest failure in two components in node modules.

\ui\node_modules\ @us-shield\react-breadcrumb\dist\esm\index.js

\ui\node_modules\react-pdf/dist/esm/entry.webpack.js

Tried transformIgnorePatterns in jest config as below:-

transformIgnorePatterns: [
    "/node_modules/(?!(@us-shield|react-pdf)/)",
    "/react-pdf/",
  ],

After this, first error gone , but 2nd error related to "react-pdf" remains same.

Anyone please advice. Thanks.

0

There are 0 best solutions below