Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda