Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

451
Views
Ignore imports from dependencies in node modules in jest config

I'm currently setting up unit tests for a project and have stumbled on a issue with imports on a dependency.

My jest.config.js is:

export default {
    preset: "ts-jest/presets/default",
    testEnvironment: 'jsdom',
    testRegex: "ui-modifications/test/",
    moduleDirectories: ["node_modules", "src"],
    globals: {
        "ts-jest": {
            diagnostics: false,
            isolatedModules: true,
        },
    },
};

Currently this is the error I am getting when running the tests

Cannot find module '@forge/bridge' from 'src/index.ts'

where @forge/bridge is the said dependency and src/index.ts is the file I am currently trying to test.

I am assuming I either have some config missing or some wrong.

Any help would be appreciated :)

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!