Skip to content

Commit

Permalink
fix: typescript doc template add fn return type
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed May 17, 2021
1 parent 72ab2fe commit 145c52f
Show file tree
Hide file tree
Showing 33 changed files with 36 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { VariantButtonProps } from './VariantButton';
const data: Record<string, Record<string, VariantButtonProps>> = {
export default {
overview: {
'1': {
text: 'Cecelia Langosh',
Expand Down Expand Up @@ -39,4 +38,3 @@ const data: Record<string, Record<string, VariantButtonProps>> = {
},
},
};
export default data;
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('VariantButton', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const renderedExamples = renderDocument(examples, config{{? it.data }}, data{{?}
renderedExamples.forEach(({ name, rendered {{? it.data }}, dataId, values{{?}}}) => {
describe(name, () => {
{{? it.data }}
const runTests = () => {
const runTests = (){{? it.format === 'ts' }}: void{{?}} => {
{{?}}
it('snapshot', () => {
const component = mount(rendered);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (!renderedExamples.length) {
renderedExamples.forEach(({ name, rendered{{? it.data }}, dataId, values{{?}}}) => {
describe(name, () => {
{{? it.data }}
const runTests = () => {
const runTests = (){{? it.format === 'ts' }}: void{{?}} => {
{{?}}

it('snapshot', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (!renderedExamples) {
renderedExamples.forEach(({ name, rendered{{? it.data }}, dataId, values{{?}}}) => {
describe(name, () => {
{{? it.data }}
const runTests = () => {
const runTests = (){{? it.format === 'ts' }}: void{{?}} => {
{{?}}

it('snapshot', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('Popover', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down Expand Up @@ -150,7 +150,7 @@ describe('VariantButton', () => {
const renderedExamples = renderDocument(examples, config, data);
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const component = mount(rendered);
expect(toJson(component, { mode: 'deep' })).toMatchSnapshot();
Expand Down Expand Up @@ -248,7 +248,7 @@ describe('VariantButton', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const component = renderer.create(rendered);
if (!component) {
Expand Down Expand Up @@ -301,7 +301,7 @@ describe('VariantButton', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('VariantButton', () => {
const renderedExamples = renderDocument(examples, config, data);
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const component = mount(rendered);
expect(toJson(component, { mode: 'deep' })).toMatchSnapshot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('VariantButton', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('VariantButton', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const component = renderer.create(rendered);
if (!component) {
Expand Down
2 changes: 1 addition & 1 deletion ui/app/src/AppError/AppError.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('AppError', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/blocks/src/ComponentCommits/ComponentCommits.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('ComponentCommits', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/blocks/src/StoryData/StoryData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('StoryData', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/blocks/src/TestsCoverage/TestsCoverage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('TestsCoverage', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/blocks/src/TestsResults/TestsResults.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('TestsResults', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/ActionBar/ActionBar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('ActionBar', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/BlockContainer/BlockContainer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('BlockContainer', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/Collapsible/Collapsible.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Collapsible', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/Donut/Donut.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Donut', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/ExternalLink/ExternalLink.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('ExternalLink', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/GithubAvatar/GithubAvatar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('GithubAvatar', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/InfoTip/InfoTip.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('InfoTip', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/LinkHeading/LinkHeading.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('LinkHeading', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/Popover/Popover.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Popover', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('ProgressIndicator', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/Shield/Shield.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Shield', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/Sidebar/Sidebar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Sidebar', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/Source/Source.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Source', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/Subtitle/Subtitle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Subtitle', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('SyntaxHighlighter', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/Table/Table.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Table', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/Tag/Tag.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Tag', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/TitledImage/TitledImage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('TitledImage', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/Value/Value.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Value', () => {
}
renderedExamples.forEach(({ name, rendered, dataId, values }) => {
describe(name, () => {
const runTests = () => {
const runTests = (): void => {
it('snapshot', () => {
const { asFragment } = render(rendered);
expect(asFragment()).toMatchSnapshot();
Expand Down

0 comments on commit 145c52f

Please sign in to comment.