<commit_before>import test from 'ava';
import { calamarMessageFormat } from 'lib/calamar'; // eslint-disable-line

test('Translate Facebook Messenger messaging item to Calamar message format', t => {
    const text = 'hello';
    const timestamp = 1465304850533;
    const mid = 'mid.1465304850526:21ca65ee5092344595';
    const senderId = '10154319360809636';
    const recipientId = '721458654659118';
    const platformName = 'facebookMessenger';
    const facebookMessagingItem = {
        sender: {
            id: senderId
        },
        recipient: {
            id: recipientId
        },
        timestamp,
        message: {
            mid,
            seq: 111,
            text
        }
    };
    const calamarMessage = {
        text,
        timestamp,
        messageId: mid,
        senderId,
        recipientId,
        chatId: senderId,
        platform: platformName<commit_msg>fix calamar message formatter failing test<commit_after>import test from 'ava';
import { calamarMessageFormat } from 'lib/calamar'; // eslint-disable-line

test('Translate Facebook Messenger messaging item to Calamar message format', t => {
    const text = 'hello';
    const timestamp = 1465304850533;
    const mid = 'mid.1465304850526:21ca65ee5092344595';
    const senderId = '10154319360809636';
    const recipientId = '721458654659118';
    const platformName = 'facebookMessenger';
    const facebookMessagingItem = {
        sender: {
            id: senderId
        },
        recipient: {
            id: recipientId
        },
        timestamp,
        message: {
            mid,
            seq: 111,
            text
        }
    };
    const calamarMessage = {
        text,
        timestamp,
        messageId: mid,
        isEcho: false,
        senderId,
        recipientId,
        chatId: senderId,
        platform: platformName
{'fraction_non_alphanumeric': 0.08602150537634409, 'fraction_numerical': 0.08064516129032258, 'mean_word_length': 2.030944625407166, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4069779', 'n_tokens_mistral': 618, 'n_tokens_neox': 521, 'n_words': 132}