-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No-state-locale-separators #164
Conversation
fixes tests and displayAmount usage one test is still failing because displayAmount logic seems to be incorrect
✅ Deploy Preview for chipper-sunburst-578cfe ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This is an alternative approach to #159 - I just copied your commit, but removed redux to avoid testing import errors One test still fails, but this time correctly - due to logic error in the displayAmount
@fliebenberg I believe it would be easier for you to fix this error, you can push directly to this branch if you are ok with this approach. |
I have added decimalSeparator and thousandsSeparator as 2 optional parameters to the displayAmount function. This adds nice functionality in case someone wants to be explicit about the separators, but more importantly it helps to make sure the tests can work. The problem in the test case you flagged was that although the test was written for cases where there is no thousandsSeparator, there was no way to explicitly force no thousandsSeparator. This is where the optional parameters in the function helps. All the tests work now again as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems to be working as expected now. displayAmount automatically uses locale specific separators unless the caller specifically provides separators.
All tests pass and app compiles without problem.
fixes #76
fixes #158