Something went wrong. Try again.
Bluesky app fork with some witchin' additions 馃挮
Something went wrong. Try again.
12345678910111213141516171819202122232425import {describe, expect, it} from '@jest/globals'
import {isRTLText} from '../text-direction'
describe('isRTLText', () => { it('recognizes right-to-left text', () => { expect(isRTLText('注讘专讬转')).toBe(true) expect(isRTLText('丕賱毓乇亘賷丞')).toBe(true) })
it('recognizes left-to-right text', () => { expect(isRTLText('English')).toBe(false) })
it('uses the first strong directional character', () => { expect(isRTLText(' 123 馃 注讘专讬转 English')).toBe(true) expect(isRTLText(' 123 馃 English 注讘专讬转')).toBe(false) })
it('defaults to left-to-right when there are no strong characters', () => { expect(isRTLText('123 馃 ...')).toBe(false) expect(isRTLText('')).toBe(false) })})