Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Jun 10, 2024
1 parent 15b5475 commit e533bfa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions __tests__/ExpensiMark-HTML-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1844,9 +1844,15 @@ describe('when should keep raw input flag is enabled', () => {
expect(parser.replace(testString, {shouldKeepRawInput: true})).toBe(resultString);
});

test('user mention from phone number', () => {
test('user mention from invalid phone number', () => {
const testString = '@+1234567890';
const resultString = '<mention-user>@+1234567890</mention-user>';
const resultString = '@+1234567890';
expect(parser.replace(testString, {shouldKeepRawInput: true})).toBe(resultString);
});

test('user mention from valid phone number', () => {
const testString = '@+15005550006';
const resultString = '<mention-user>@+15005550006</mention-user>';
expect(parser.replace(testString, {shouldKeepRawInput: true})).toBe(resultString);
});
});
Expand Down

0 comments on commit e533bfa

Please sign in to comment.