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

187
Visualizações
Unit test breaks after dependencies update for Node 16

I just made some changes to my project's package.json:

  • removed bundle-buddy-webpack-plugin
  • upgraded eslint from 4.11.0 to 6.0.0
  • upgraded prettier from 1.14.3 to 2.0.0
  • upgraded webpack from 4.28.1 to 4.36.0

Besides the above, all I did was formatting some text as lint wanted. That was all the changes.

But for some reason, on Windows, some unit tests that expect value break. Before these changes I was getting a numberDOTdecimals. Now, my expect fails because it gets numberCOMMAdecimals. Also I change Windows System Separator from comma to dot but it isn't helping.

jest unit tests failing because it receives comma instead of dot

Why this is a problem is that on my colleague mac it works just fine, as well on Jenkins where all suites of unit tests are running when creating a merge request.

Does anyone have any idea why this behavior occurs?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Found the issue/difference. It was indeed the locale. It seems that it took that locale and used that format. Is interesting that before the upgrade above, I was calling toLocaleString with undefined and it used the EN format, but now it uses the system's one.

The solution was to change my system's Region/Format to whatever I was expecting to receive.

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