Skip to content

Commit

Permalink
test case added
Browse files Browse the repository at this point in the history
  • Loading branch information
HardikChoudhary24 committed Oct 30, 2023
1 parent 7054c51 commit a2c2025
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/unit/ConvertToLTRForComposerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ describe('convertToLTRForComposer', () => {
}
});

test('Input with mixed RTL and LTR characters is prefixed with LTR marker', () => {
// Test when input contains mix of RTL and LTR characters
const inputText = 'مثال test ';
const result = convertToLTRForComposer(inputText);
if (platform === 'android') {
expect(result).toBe(inputText);
} else {
expect(result).toBe(`${CONST.UNICODE.LTR}${inputText}`);
}
});

test('Input with only space remains unchanged', () => {
// Test when input contains only spaces
const inputText = ' ';
Expand Down

0 comments on commit a2c2025

Please sign in to comment.