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

182
Views
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 answers
Answer question

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 Report
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!