Skip to content

Commit

Permalink
test: add tests for new AU formats
Browse files Browse the repository at this point in the history
  • Loading branch information
ziemkowski authored and ybrusentsov committed Nov 11, 2023
1 parent 9453169 commit ca14b89
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/utils/countryUtils/__tests__/getActiveFormattingMask.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,34 @@ describe('getActiveFormattingMask', () => {
}),
).toBe('. .... ....');

expect(
getActiveFormattingMask({
phone: '+61131234',
country: getCountryByIso2('au'),
}),
).toBe('.. .. ..');

expect(
getActiveFormattingMask({
phone: '+611300123456',
country: getCountryByIso2('au'),
}),
).toBe('.... ... ...');

expect(
getActiveFormattingMask({
phone: '+611801234',
country: getCountryByIso2('au'),
}),
).toBe('... ....');

expect(
getActiveFormattingMask({
phone: '+611800123456',
country: getCountryByIso2('au'),
}),
).toBe('.... ... ...');

// should return default mask if provided phone is empty
expect(
getActiveFormattingMask({
Expand Down

2 comments on commit ca14b89

@vercel
Copy link

@vercel vercel bot commented on ca14b89 Nov 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on ca14b89 Nov 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.