Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JEST transformIgnorePatterns not working #1947

Open
robvaneckalliander opened this issue Mar 8, 2024 · 1 comment
Open

JEST transformIgnorePatterns not working #1947

robvaneckalliander opened this issue Mar 8, 2024 · 1 comment
Labels

Comments

@robvaneckalliander
Copy link

    "@swimlane/ngx-charts": "^20.5.0",

    "@types/jest": "^29.5.12",
    "@types/node": "^18.18.0",
    "@typescript-eslint/eslint-plugin": "^6.19.0",
    "@typescript-eslint/parser": "^6.19.0",
    "jest": "^29.7.0",
    "jest-canvas-mock": "^2.5.2",
    "jest-environment-jsdom": "^29.7.0",
    "jest-preset-angular": "^14.0.3",

already tried:

jest.config.js

const esModules = ['@swimlane', '@swimlane*', 'd3', 'd3-array', 'd3-selection', 'd3-*'].join('|');

transformIgnorePatterns: [
    `<rootDir>/node_modules/(?!${esModules})`,
  ],

but still

d3-selection\src\index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export {default as create} from "./create.js";
                                                                                      ^^^^^^

    SyntaxError: Unexpected token 'export' 
@erwanbecquetdedalus
Copy link

Hello, same problem here.
Is there any updates on this ?
@robvaneckalliander did you find a way to bypass the problem ?
Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants