Skip to content

Commit d52e905

Browse files
authored
Add test for #16207 (#16890)
1 parent a1e354d commit d52e905

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Foo {
2+
constructor(
3+
@required
4+
// comment
5+
protected readonly myParam: string,
6+
) {}
7+
}

tests/format/typescript/comments/__snapshots__/format.test.js.snap

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,32 @@ class Foo {
222222
================================================================================
223223
`;
224224

225+
exports[`16207.ts format 1`] = `
226+
====================================options=====================================
227+
parsers: ["typescript"]
228+
printWidth: 80
229+
| printWidth
230+
=====================================input======================================
231+
class Foo {
232+
constructor(
233+
@required
234+
// comment
235+
protected readonly myParam: string,
236+
) {}
237+
}
238+
239+
=====================================output=====================================
240+
class Foo {
241+
constructor(
242+
@required
243+
// comment
244+
protected readonly myParam: string,
245+
) {}
246+
}
247+
248+
================================================================================
249+
`;
250+
225251
exports[`abstract_class.ts format 1`] = `
226252
====================================options=====================================
227253
parsers: ["typescript"]

0 commit comments

Comments
 (0)