The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Rocket.Chat/apps/meteor/client/lib/utils/isRTLScriptLanguage.spec.ts

27 lines
572 B

import { isRTLScriptLanguage } from './isRTLScriptLanguage';
const testCases = [
['en', false],
['ar', true],
['dv', true],
['fa', true],
['he', true],
['ku', true],
['ps', true],
['sd', true],
['ug', true],
['ur', true],
['yi', true],
['ar', true],
['ar-LY', true],
['dv-MV', true],
['', false],
] as const;
testCases.forEach(([parameter, expectedResult]) => {
it(`should return ${JSON.stringify(expectedResult)} for ${JSON.stringify(parameter)}`, () => {
const result = isRTLScriptLanguage(parameter);
expect(result).toBe(expectedResult);
});
});