Javascript – Mock `Number.toLocaleString()` so it returns same results in tests independent of user locale
We have code in our class that formats a number by transforming for example 1_000_000 to 1 M and 1_500_000 to 1.5 M respectively. To achieve this we are using the following code: export const shortNumberString = (number: number) =>…