Add test for comments in parameter/argument list (#19898)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-08-20 18:54:58 +08:00
1 parent e7b8a4f86e
commit 07b7a29f51
3 files changed
+98

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
function doSomething(first, second) {
combineLatest([
first.watchIt().pipe(
// tap(x => console.log(x))
),
second.watchIt().pipe(
tap((x) => console.log(x))
),
])
}
+16
View File
@@ -0,0 +1,16 @@
class C11 {
constructor(
//a
//b
){}
method(
//a
//b
){}
get getter(
//a
//b
){}
}
@@ -1,5 +1,77 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`9678.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
printWidth: 80 (default) |
=====================================input======================================
class C11 {
constructor(
//a
//b
){}
method(
//a
//b
){}
get getter(
//a
//b
){}
}
=====================================output=====================================
class C11 {
constructor(
//a
//b
) {}
method(
//a
//b
) {}
get getter(
//a
//b
) {}
}
================================================================================
`;
exports[`14723.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
printWidth: 80 (default) |
=====================================input======================================
function doSomething(first, second) {
combineLatest([
first.watchIt().pipe(
// tap(x => console.log(x))
),
second.watchIt().pipe(
tap((x) => console.log(x))
),
])
}
=====================================output=====================================
function doSomething(first, second) {
combineLatest([
first.watchIt().pipe(
// tap(x => console.log(x))
),
second.watchIt().pipe(tap((x) => console.log(x))),
]);
}
================================================================================
`;
exports[`dangling-comment-in-list.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]