You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
Same issue here, the following simple test doesn't pass:
importIntlPolyfillfrom'intl'Intl.DateTimeFormat=IntlPolyfill.DateTimeFormat;Intl.NumberFormat=IntlPolyfill.NumberFormat;it('formatNumber should not add digits',()=>{constvalue=2.3492constformatted=(newIntl.NumberFormat('en',{maximumFractionDigits: 20})).format(value)expect(formatted).toEqual('2.3492')});
Expected value to equal:
"2.3492"
Received:
"2.34920000000000032768"
This seems to be an issue with this library, as the same code run in the browser's console behaves as expected.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We are using Intl for unit testing in node environment. We encountered strange behaviour in our tests just in this particular case.
Expected output: "145,678.12345679"
Received output: "145,678.12345679087"
we setup intl as follows:
The text was updated successfully, but these errors were encountered: