Skip to content
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

feat : Add Currency Module : [ATLAS-26, ATLAS-27, ATLAS-28] #2

Merged
merged 39 commits into from
Nov 10, 2023

Conversation

RgnDunes
Copy link
Collaborator

@RgnDunes RgnDunes commented Oct 26, 2023

Description

This PR adds Currency module to the library.

Fixes # (issue)

Additional snippets: [Thread](Paste the thread link here....)

Jira/Asana

JIRA : https://razorpay.atlassian.net/browse/ATLAS-26, https://razorpay.atlassian.net/browse/ATLAS-27, https://razorpay.atlassian.net/browse/ATLAS-28

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Local
  • Test B

Checklist:

  • Add Jira ID(s) in PR title and in the description?
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added positive and negative tests that prove my fix is effective or that my feature works - PR
  • New and existing unit tests pass locally with my changes
  • Responsive design is handled if there are new components/UI changes?
  • Any Screenshots (mobile & desktop) required for PR? If yes, have you added the respective screenshots ?
  • Any manual dev testing done by you on beta/func environment?
  • Reviewer added (SLA 2 days)

Reviewer Checklist

  • PR has right logic changes and functionality with tests is implemented as expected - Confirmed by @tarun-khanna

@RgnDunes RgnDunes changed the title add currency module code feat : Add Currency Module : Oct 26, 2023
@RgnDunes RgnDunes requested a review from tarun-khanna October 30, 2023 12:51
@RgnDunes RgnDunes changed the title feat : Add Currency Module : feat : Add Currency Module : [ATLAS-26, ATLAS-27, ATLAS-28] Oct 30, 2023
src/modules/currency/currency.d.ts Outdated Show resolved Hide resolved
src/modules/currency/data/currencies.ts Outdated Show resolved Hide resolved
src/modules/currency/data/currencies.ts Outdated Show resolved Hide resolved
src/modules/currency/formatAmount.ts Outdated Show resolved Hide resolved
src/modules/currency/formatAmount.ts Outdated Show resolved Hide resolved
src/modules/currency/formatAmount.ts Outdated Show resolved Hide resolved
src/modules/currency/formatAmount.ts Outdated Show resolved Hide resolved
src/modules/currency/formatAmount.ts Outdated Show resolved Hide resolved
src/modules/currency/getCurrencySymbol.ts Outdated Show resolved Hide resolved
src/modules/currency/types.ts Outdated Show resolved Hide resolved
* add UT

* remove window mock from test case

* remove window mock from test case

* fix failing test cases

* fix failing test cases

* fix failing test cases

* fix failing test cases

* Add UT for other currency functions

* refactor test cases
package-lock.json Outdated Show resolved Hide resolved
src/modules/currency/__tests__/formatAmountByParts.test.ts Outdated Show resolved Hide resolved
src/modules/currency/__tests__/formatAmountByParts.test.ts Outdated Show resolved Hide resolved
src/modules/currency/__tests__/formatAmountByParts.test.ts Outdated Show resolved Hide resolved
src/modules/currency/__tests__/formatNumber.test.ts Outdated Show resolved Hide resolved
src/modules/currency/formatAmountByParts.ts Outdated Show resolved Hide resolved
src/modules/currency/formatAmountByParts.ts Outdated Show resolved Hide resolved
src/modules/shared/utils.ts Outdated Show resolved Hide resolved
src/modules/shared/utils.ts Outdated Show resolved Hide resolved
src/modules/shared/utils.ts Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Nov 9, 2023

Unit Test Results

0 files  0 suites   0s ⏱️
0 tests 0 ✔️ 0 💤 0 ❌

Results for commit 7b1d35d.

@rzpcibot
Copy link
Contributor

rzpcibot commented Nov 9, 2023

Warnings
⚠️ Your PR has over 600 lines of code additions 😱 . Try to breakup into separate PRs 👍

Bundle Size Report

Files

click to expand/collapse
🟢 No Change 🗑 File Deleted 🆕 New File 📈 Size Increased 👍 Size Reduced
Parsed (kb)
🚦 File Name Base PR Diff %
📈 cjs/index.js 0.41 13.01 $\textcolor{red}{12.6}$ 3073.17
📈 esm/index.js 0.39 12.99 $\textcolor{red}{12.6}$ 3230.77
📈 umd/index.js 0.83 14.53 $\textcolor{red}{13.7}$ 1650.6

Generated by 🚫 dangerJS against f0fdb3e

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (master@8a79c24). Click here to learn what that means.

Additional details and impacted files
@@            Coverage Diff            @@
##             master       #2   +/-   ##
=========================================
  Coverage          ?   83.16%           
=========================================
  Files             ?       13           
  Lines             ?      101           
  Branches          ?       28           
=========================================
  Hits              ?       84           
  Misses            ?       17           
  Partials          ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tarun-khanna tarun-khanna merged commit df89302 into master Nov 10, 2023
10 checks passed
@tarun-khanna tarun-khanna deleted the currency-module branch November 10, 2023 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants