<commit_before>const assert = require('yeoman-assert');
const helpers = require('yeoman-test');
const { requiredDefaultConfig, defaultConfig } = require('../generators/generator-defaults');
const EnvironmentBuilder = require('../cli/environment-builder');

describe('JHipster generator with require configuration', () => {
    before(() => {
        return helpers
            .create('jhipster:app', {}, { createEnv: EnvironmentBuilder.createEnv })
            .withLocalConfig(requiredDefaultConfig)
            .withOptions({
                'from-cli': true,
                skipInstall: true,
            })
            .run();
    });

    it('Writes additional default config to .yo-rc.json', () => {
        assert.JSONFileContent('.yo-rc.json', {
            'generator-jhipster': { ...defaultConfig, languages: [defaultConfig.nativeLanguage] },
        });
    });
});<commit_msg>Apply suggestions from code review<commit_after>const assert = require('yeoman-assert');
const helpers = require('yeoman-test');
const { requiredDefaultConfig, defaultConfig } = require('../generators/generator-defaults');
const EnvironmentBuilder = require('../cli/environment-builder');

describe('JHipster generator with required configuration', () => {
    before(() => {
        return helpers
            .create('jhipster:app', {}, { createEnv: EnvironmentBuilder.createEnv })
            .withLocalConfig(requiredDefaultConfig)
            .withOptions({
                'from-cli': true,
                skipInstall: true,
            })
            .run();
    });

    it('writes additional default config to .yo-rc.json', () => {
        assert.JSONFileContent('.yo-rc.json', {
            'generator-jhipster': { ...defaultConfig, languages: [defaultConfig.nativeLanguage] },
        });
    });
});
{'fraction_non_alphanumeric': 0.15316315205327413, 'fraction_numerical': 0.0, 'mean_word_length': 2.687116564417178, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5740648', 'n_tokens_mistral': 463, 'n_tokens_neox': 454, 'n_words': 88}