<commit_before>add_dependencies({
    people: 'js/people.js',
    pm_conversations: 'js/pm_conversations.js',
    util: 'js/util.js',
});

var noop = function () {};
var with_overrides = global.with_overrides;
var people = global.people;

set_global('$', global.make_zjquery());
set_global('document', 'document-stub');

set_global('alert_words', {
    process_message: noop,
});

set_global('topic_data' , {
    add_message: noop,
});

set_global('recent_senders', {
    process_message_for_senders: noop,
});

set_global('page_params', {
    realm_allow_message_editing: true,
    is_admin: true,
});

set_global('blueslip', {});

var me = {
    email: '<EMAIL>',
    user_id: 101,
    full_name: '<NAME>',
};

var alice = {
    email: '<EMAIL>',
    user_id: 102,
    full_name: 'Alice',
};

var bob = {
    email: '<EMAIL>',
    user_id: 103,
    full_name: 'Bob',
};

var cindy = {
    email: '<EMAIL>',
    user_id: 104,
    full_name: 'Cindy',
};

people.add_in_realm(me);
people.add_in_realm(alice);
people.add_in_realm(bob);
people.add_in_realm(cindy);

global.people.initialize_current_user(me.user_id);

var message_store = require('js/message_store.js');

(function test_insert_recent_private_message() {
    message_store.insert_recent_private_message('1', 1001);
    message_store.insert_recent_private_message('2', 2001);
    message_store.insert_recent_private_message('1', 3001);

    // try to backdate user1's timestamp
    message_store.insert_recent_private_message('1', 555);<commit_msg>node tests: Use zrequire in message_store.js.<commit_after>zrequire('pm_conversations');
zrequire('util');
zrequire('people');
zrequire('message_store');

var noop = function () {};
var with_overrides = global.with_overrides;
var people = global.people;

set_global('$', global.make_zjquery());
set_global('document', 'document-stub');

set_global('alert_words', {
    process_message: noop,
});

set_global('topic_data' , {
    add_message: noop,
});

set_global('recent_senders', {
    process_message_for_senders: noop,
});

set_global('page_params', {
    realm_allow_message_editing: true,
    is_admin: true,
});

set_global('blueslip', {});

var me = {
    email: '<EMAIL>',
    user_id: 101,
    full_name: '<NAME>',
};

var alice = {
    email: '<EMAIL>',
    user_id: 102,
    full_name: 'Alice',
};

var bob = {
    email: '<EMAIL>',
    user_id: 103,
    full_name: 'Bob',
};

var cindy = {
    email: '<EMAIL>',
    user_id: 104,
    full_name: 'Cindy',
};

people.add_in_realm(me);
people.add_in_realm(alice);
people.add_in_realm(bob);
people.add_in_realm(cindy);

global.people.initialize_current_user(me.user_id);

(function test_insert_recent_private_message() {
    message_store.insert_recent_private_message('1', 1001);
    message_store.insert_recent_private_message('2', 2001);
    message_store.insert_recent_private_message('1', 3001);

    // try to backdate user1's timestamp
    message_store.insert_recent_private_message('1', 555);
{'fraction_non_alphanumeric': 0.15762883125631524, 'fraction_numerical': 0.02155607948804311, 'mean_word_length': 4.92814371257485, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4217761', 'n_tokens_mistral': 1164, 'n_tokens_neox': 1102, 'n_words': 178}