<commit_before>import { expect } from 'chai';
import { calcSettingsForLanguage, defaultLanguageSettings } from '../src/LanguageSettings';

describe('Validate LanguageSettings', () => {
    it('tests merging language settings', () => {
        const sPython = calcSettingsForLanguage(defaultLanguageSettings, 'python');
        expect(sPython.allowCompoundWords).to.be.true;
        expect((sPython.dictionaries || []).sort()).to.be.deep.equal(['wordsEn', 'companies', 'softwareTerms', 'node', 'python', 'misc'].sort());

        const sPhp = calcSettingsForLanguage(defaultLanguageSettings, 'php');
        expect(sPhp.allowCompoundWords).to.be.undefined;
        expect((sPhp.dictionaries || []).sort())
            .to.be.deep.equal(['wordsEn', 'companies', 'softwareTerms', 'node', 'php', 'html', 'fonts', 'css', 'typescript', 'misc'].sort());
    });
});<commit_msg>Node is no longer included by default.<commit_after>import { expect } from 'chai';
import { calcSettingsForLanguage, defaultLanguageSettings } from '../src/LanguageSettings';

describe('Validate LanguageSettings', () => {
    it('tests merging language settings', () => {
        const sPython = calcSettingsForLanguage(defaultLanguageSettings, 'python');
        expect(sPython.allowCompoundWords).to.be.true;
        expect((sPython.dictionaries || []).sort()).to.be.deep.equal(['wordsEn', 'companies', 'softwareTerms', 'python', 'misc'].sort());

        const sPhp = calcSettingsForLanguage(defaultLanguageSettings, 'php');
        expect(sPhp.allowCompoundWords).to.be.undefined;
        expect((sPhp.dictionaries || []).sort())
            .to.be.deep.equal(['wordsEn', 'companies', 'softwareTerms', 'php', 'html', 'fonts', 'css', 'typescript', 'misc'].sort());
    });
});
{'fraction_non_alphanumeric': 0.18467695826186392, 'fraction_numerical': 0.0, 'mean_word_length': 4.537974683544304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4609167', 'n_tokens_mistral': 521, 'n_tokens_neox': 492, 'n_words': 92}