<commit_before>import { expect } from 'chai';
import chalk from 'chalk';

import { CommandInstance, ModifiedOptionMetadata, ModifiedParamMetadata } from '../../command/command-instance';
import { generateCommandUsage, generateOptionDocs, generateParamDocs, indent } from '../../help/util';

const emptyInstance: CommandInstance = {
    instance: '',
    name: 'l',
    alias: ['p'],
    params: [],
    paramTypes: [],
    options: {},
    description: 'hello!',
};

const option: ModifiedOptionMetadata = {
    name: 'option',
    alias: ['o'],
    propertyKey: 'option',
    description: 'hello',
    type: 'String',
};

const param: ModifiedParamMetadata = {
    name: 'param',
    description: 'hello',
    index: 0,
};

describe('Help Utilities', () => {
    describe('Indent', () => {
        it('should indent the string by four spaces once', () => {
            expect(indent(1, 'hello')).to.equal('    hello');
        });

        it('should indent the string by four spaces n times', () => {
            expect(indent(3, 'hello')).to.equal('            hello');
        });
    });
<commit_msg>test(core): test indent with no args<commit_after>import { expect } from 'chai';
import chalk from 'chalk';

import { CommandInstance, ModifiedOptionMetadata, ModifiedParamMetadata } from '../../command/command-instance';
import { generateCommandUsage, generateOptionDocs, generateParamDocs, indent } from '../../help/util';

const emptyInstance: CommandInstance = {
    instance: '',
    name: 'l',
    alias: ['p'],
    params: [],
    paramTypes: [],
    options: {},
    description: 'hello!',
};

const option: ModifiedOptionMetadata = {
    name: 'option',
    alias: ['o'],
    propertyKey: 'option',
    description: 'hello',
    type: 'String',
};

const param: ModifiedParamMetadata = {
    name: 'param',
    description: 'hello',
    index: 0,
};

describe('Help Utilities', () => {
    describe('Indent', () => {
        it('should indent the string by four spaces once', () => {
            expect(indent(1, 'hello')).to.equal('    hello');
        });

        it('should indent the string by four spaces n times', () => {
            expect(indent(3, 'hello')).to.equal('            hello');
        });

        it('should indent nothing by 0 if nothing is passed in', () => {
            expect(indent()).to.equal('');
        });
    });

{'fraction_non_alphanumeric': 0.1735817104149026, 'fraction_numerical': 0.0029635901778154107, 'mean_word_length': 2.8737704918032785, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '7297243', 'n_tokens_mistral': 679, 'n_tokens_neox': 664, 'n_words': 180}