<commit_before>import test from 'ava';
import Dictionary from './../src/dictionary';

test('it can check for locale existance', t => {
    const dict = new Dictionary({
        en: { }
    });

    t.true(dict.hasLocale('en'));
    t.false(dict.hasLocale('ar'));
});

test('it can check for message existance', t => {<commit_msg>add new test to dictionary<commit_after>import test from 'ava';
import Dictionary from './../src/dictionary';

test('it does not merge if a non object is provided', t => {
    const dict = new Dictionary('a string');

    t.false(dict.hasLocale('en'));
});

test('it can check for locale existance', t => {
    const dict = new Dictionary({
        en: { }
    });

    t.true(dict.hasLocale('en'));
    t.false(dict.hasLocale('ar'));
});

test('it can check for message existance', t => {
{'fraction_non_alphanumeric': 0.17481662591687042, 'fraction_numerical': 0.0, 'mean_word_length': 3.403225806451613, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '3993259', 'n_tokens_mistral': 252, 'n_tokens_neox': 246, 'n_words': 79}