Skip to content

Commit

Permalink
[test]: add missing UT
Browse files Browse the repository at this point in the history
  • Loading branch information
RgnDunes committed May 12, 2024
1 parent b7c1b9c commit 516c149
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,17 @@ describe('phoneNumber - getMaskedPhoneNumber', () => {
'maskedDigitsCount exceeds phone number length. Value of "maskedDigitsCount" is 20',
);
});

it('should format the phone number without including the dial code when withDialCode is false', () => {
const options = {
countryCode: 'US',
withDialCode: false,
maskingOptions: {
completeMasking: true,
},
};
const expectedOutput = 'xxx-xxx-xxxx';
const result = getMaskedPhoneNumber(options as GetMaskedPhoneNumberOptions);
expect(result).toBe(expectedOutput);
});
});

0 comments on commit 516c149

Please sign in to comment.