<commit_before>import {completeWithTemplate} from '../../../src/app/core/util/complete-with-template';

describe('completeWithTemplate', () => {

    it('base case', () => {

        const result = completeWithTemplate({}, { a: 1 });
        expect(result['a']).toBe(1);
    });


    it('do not overwrite', () => {

        const result = completeWithTemplate({ a: 2 }, { a: 1 });
        expect(result['a']).toBe(2);
    });


    it('do not overwrite 2', () => {

        const result = completeWithTemplate({ a: 3 }, { a: { b: 1 } });
        expect(result['a']).toBe(3);
    });


    it('recursive case 1', () => {
<commit_msg>Add test case<commit_after>import {completeWithTemplate} from '../../../src/app/core/util/complete-with-template';

describe('completeWithTemplate', () => {

    it('base case', () => {

        const result = completeWithTemplate({}, { a: 1 });
        expect(result['a']).toBe(1);
    });


    it('do not overwrite', () => {

        const result = completeWithTemplate({ a: 2 }, { a: 1 });
        expect(result['a']).toBe(2);
    });


    it('do not overwrite 2', () => {

        const result = completeWithTemplate({ a: 3 }, { a: { b: 1 } });
        expect(result['a']).toBe(3);
    });


    it('do not overwrite false', () => {

        const result = completeWithTemplate({ a: false }, { a: 3 });
        expect(result['a']).toBe(false);
    });


    it('recursive case 1', () => {

{'fraction_non_alphanumeric': 0.22198879551820727, 'fraction_numerical': 0.014705882352941176, 'mean_word_length': 2.5459057071960296, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, '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': '925367', 'n_tokens_mistral': 478, 'n_tokens_neox': 432, 'n_words': 94}