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/app/ui-utils/tests/server.tests.js

23 lines
573 B

/* eslint-env mocha */
import 'babel-polyfill';
import assert from 'assert';
import './server.mocks.js';
import { messageProperties } from '../lib/MessageProperties';
const messages = {
'Sample Message': 14,
'Sample 1 ⛳': 10,
'Sample 2 ❤': 10,
'Sample 3 ⛳❤⛳❤': 13,
};
describe('Message Properties', () => {
describe('Check Message Length', () => {
Object.keys(messages).forEach((objectKey) => {
it('should treat emojis as single characters', () => {
assert.equal(messageProperties.length(objectKey), messages[objectKey]);
});
});
});
});