<commit_before>import { expect }   from 'chai';
import fillTemplate from '../fill_template';

describe('fillTemplate', () => {
    it('works for string without tags', () => {
        expect(fillTemplate('hello world')).to.eql(['hello world']);
    });
    it('works for template with one tag replaced with string', () => {
        expect(fillTemplate('there is no [_1]', { '1': 'spoon' })).to.eql(['there is no ', 'spoon']);
        expect(fillTemplate('[_1] is no spoon', { '1': 'there' })).to.eql(['there', ' is no spoon']);
        expect(fillTemplate('there is [_1] spoon', { '1': 'no' })).to.eql(['there is ', 'no', ' spoon']);
    });
});
<commit_msg>break up test<commit_after>import { expect }   from 'chai';
import fillTemplate from '../fill_template';

describe('fillTemplate', () => {
    it('works for string without tags', () => {
        expect(fillTemplate('hello world')).to.eql(['hello world']);
    });
    it('works for template with 1 tag at the end replaced with string', () => {
        expect(fillTemplate('there is no [_1]', { '1': 'spoon' })).to.eql(['there is no ', 'spoon']);
    });
    it('works for template with 1 tag at the start replaced with string', () => {
        expect(fillTemplate('[_1] is no spoon', { '1': 'there' })).to.eql(['there', ' is no spoon']);
    });
    it('works for template with 1 tag in the middle replaced with string', () => {
        expect(fillTemplate('there is [_1] spoon', { '1': 'no' })).to.eql(['there is ', 'no', ' spoon']);
    });
});

{'fraction_non_alphanumeric': 0.21808510638297873, 'fraction_numerical': 0.00997340425531915, 'mean_word_length': 3.533132530120482, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '5936764', 'n_tokens_mistral': 469, 'n_tokens_neox': 461, 'n_words': 141}