Chatwoot/app/javascript/shared/helpers/specs/MessageFormatter.spec.js
Nithin David Thomas 7fcd2d0e85
Feature: Support file type messages on widget and dashboard (#659)
- Adds support for file upload

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
Co-authored-by: Sojan <sojan@pepalo.com>
2020-04-02 12:28:38 +05:30

13 lines
544 B
JavaScript

import MessageFormatter from '../MessageFormatter';
describe('#MessageFormatter', () => {
describe('content with links', () => {
it('should format correctly', () => {
const message =
'Chatwoot is an opensource tool\nSee more at https://www.chatwoot.com';
expect(new MessageFormatter(message).formattedMessage).toEqual(
'Chatwoot is an opensource tool<br>See more at <a rel="noreferrer noopener nofollow" href="https://www.chatwoot.com" target="_blank">https://www.chatwoot.com</a>'
);
});
});
});