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

189
Visualizações
Test code with automatically replaced strings

I have JS & CSS files where a constant is replaced when the code is transformed (using Rollup in my case but the replacement could have been done in other ways also for the purpose of this question).

My constant {{PREFIX}} is being replaced with the string wx-.

For example, a CSS file can have such selector:

.{{PREFIX}}foo{ ... }

And a JS file:

export const NAMESPACE = '{{PREFIX}}foo';

Jest does not understand this obviously, and I am unsure how to process the files before the tests run, so the strings will be replaced, allowing Jest to run on valid code.

about 4 years ago · Juan Pablo Isaza
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