Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

457
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda