describe(`declarationTitle helper`, () => { test(`should compi;e`, () => { expect(Handlebars.helpers.declarationTitle.call(project.findReflectionByName('color'))).toMatchSnapshot(); }); });
export function relativeURL(url: string) { return MarkdownTheme.handlebars.helpers.relativeURL(url); }
export function ifBreadcrumbs(this: PageEvent, options) { if (MarkdownTheme.isSingleFile) { return options.inverse(this); } return MarkdownTheme.handlebars.helpers.ifBreadcrumbs.call(this, options); }
export function ifIndexes(options) { return MarkdownTheme.handlebars.helpers.ifIndexes.call(this, options); }
describe(`signatureTitle helper`, () => { test(`should compile`, () => { const data = project.findReflectionByName('functionWithParameters'); const result = Handlebars.helpers.signatureTitle.call(data.signatures[0]); expect(result).toMatchSnapshot(); }); });
describe(`utils helpers`, () => { test(`should compile headings helper`, () => { expect(Handlebars.helpers.heading.call(this, 2)).toEqual('##'); }); test(`should compile stripLineBreaks helper`, () => { const result = Handlebars.helpers.stripLineBreaks.call('line 1\n line2\n'); expect(result).toMatchSnapshot('line 1 line2'); }); test(`should compile spaces helper`, () => { const result = Handlebars.helpers.spaces.call(this, 3); expect(result).toEqual('!spaces '); }); });
describe(`literal helper`, () => { test(`should compile object literal`, () => { const data = project.findReflectionByName('objectLiteral'); const result = Handlebars.helpers.literal.call(data); expect(result).toMatchSnapshot(); }); test(`should compile type literal`, () => { const data = project.findReflectionByName('typeLiteral'); const result = Handlebars.helpers.literal.call(data); expect(result).toMatchSnapshot(); }); });
describe(`typeAndParent helper`, () => { test(`should compile`, () => { const data = project.findReflectionByName('BaseClass'); const result = Handlebars.helpers.typeAndParent.call(data.children[3].implementationOf); expect(result).toMatchSnapshot(); }); });
export function breadcrumbs(this: PageEvent) { return MarkdownTheme.handlebars.helpers.breadcrumbs.call(this); }
describe(`parameterTable helper`, () => { test(`should compile`, () => { const data = project.findReflectionByName('functionWithDefaults'); const result = Handlebars.helpers.parameterTable.call(data.signatures[0].parameters); expect(result).toMatchSnapshot(); }); });
export function comment(this: string) { return MarkdownTheme.handlebars.helpers.comment.call(this); }
describe(`parameterNameAndType helper`, () => { test(`sould compile`, () => { const data = project.findReflectionByName('objectLiteral'); const result = Handlebars.helpers.parameterNameAndType.call(data); expect(result).toMatchSnapshot(); }); });
export function ifNamedAnchors(options) { return MarkdownTheme.handlebars.helpers.ifNamedAnchors.call(this, options); }
describe(`type helper`, () => { test(`should compile intrinsic type`, () => { const data = project.findReflectionByName('color'); const result = Handlebars.helpers.type.call(data.type); expect(result).toMatchSnapshot(); }); });
export function ifSources(options) { return MarkdownTheme.handlebars.helpers.ifSources.call(this, options); }