Skip to content

Commit

Permalink
Add test for #16207 (#16890)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker authored Nov 26, 2024
1 parent a1e354d commit d52e905
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/format/typescript/comments/16207.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class Foo {
constructor(
@required
// comment
protected readonly myParam: string,
) {}
}
26 changes: 26 additions & 0 deletions tests/format/typescript/comments/__snapshots__/format.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,32 @@ class Foo {
================================================================================
`;

exports[`16207.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
| printWidth
=====================================input======================================
class Foo {
constructor(
@required
// comment
protected readonly myParam: string,
) {}
}
=====================================output=====================================
class Foo {
constructor(
@required
// comment
protected readonly myParam: string,
) {}
}
================================================================================
`;

exports[`abstract_class.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
Expand Down

0 comments on commit d52e905

Please sign in to comment.