Skip to content

Commit

Permalink
test: add tagGroup test
Browse files Browse the repository at this point in the history
issue: #191
  • Loading branch information
hosseinmd committed Oct 5, 2023
1 parent de71607 commit 2f5de4f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/__snapshots__/tagGroup.test.ts.snap
@@ -1,5 +1,25 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Inconsistant formatting 1`] = `
"/**
* Aliquip ex proident tempor eiusmod aliquip amet. Labore commodo nulla
* tempor consequat exercitation incididunt non. Duis laboris reprehenderit
* proident proident.
*
* @example
* const foo = 0;
*
* @param id A test id.
*
* @throws Minim sit ad commodo ut dolore magna magna minim consequat. Ex
* consequat esse incididunt qui voluptate id voluptate quis ex et.
* Ullamco cillum nisi amet fugiat.
*
* @see {@link http://acme.com}
*/
"
`;
exports[`Tag group 1`] = `
"/**
* Aliquip ex proident tempor eiusmod aliquip amet. Labore commodo nulla
Expand Down
28 changes: 28 additions & 0 deletions tests/tagGroup.test.ts
Expand Up @@ -90,3 +90,31 @@ test("space after unknownTag", async () => {

expect(await _subject(await _subject(result))).toMatchSnapshot();
});

test("Inconsistant formatting", async () => {
const result = await subject(
`
/**
* Aliquip ex proident tempor eiusmod aliquip amet. Labore commodo nulla tempor
* consequat exercitation incididunt non. Duis laboris reprehenderit proident
* proident.
*
* @example
* const foo = 0;
*
*
* @param id A test id.
*
* @throws Minim sit ad commodo ut dolore magna magna minim consequat. Ex
* consequat esse incididunt qui voluptate id voluptate quis ex et. Ullamco
* cillum nisi amet fugiat.
* @see {@link http://acme.com}
*/
`,
{
jsdocSeparateTagGroups: true,
},
);

expect(result).toMatchSnapshot();
});

0 comments on commit 2f5de4f

Please sign in to comment.