-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue: #191
- Loading branch information
Showing
5 changed files
with
89 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,3 +102,5 @@ dist/ | |
|
||
# TernJS port file | ||
.tern-port | ||
|
||
.DS_STORE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Tag group 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; | ||
* const a = \\"\\"; | ||
* const b = \\"\\"; | ||
* | ||
* @param id A test id. | ||
* | ||
* @returns Minim sit a. | ||
* | ||
* @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} | ||
*/ | ||
" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import prettier from "prettier"; | ||
import { AllOptions } from "../src/types"; | ||
|
||
function subject(code: string, options: Partial<AllOptions> = {}) { | ||
return prettier.format(code, { | ||
plugins: ["."], | ||
...options, | ||
} as AllOptions); | ||
} | ||
|
||
test("Tag group", () => { | ||
const result = subject( | ||
` | ||
/** | ||
* Aliquip ex proident tempor eiusmod aliquip amet. Labore commodo nulla tempor | ||
* consequat exercitation incididunt non. Duis laboris reprehenderit proident | ||
* proident. | ||
* @see {@link http://acme.com} | ||
* @example | ||
* const foo = 0; | ||
* const a = ""; | ||
* const b = ""; | ||
* | ||
* @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. | ||
* @return Minim sit a. | ||
*/ | ||
`, | ||
{ | ||
jsdocSeparateTagGroups: true, | ||
}, | ||
); | ||
|
||
expect(result).toMatchSnapshot(); | ||
}); |