Skip to content

Commit

Permalink
Add tests for multiple comments (#13890)
Browse files Browse the repository at this point in the history
Close #3105
  • Loading branch information
fisker committed Nov 25, 2022
1 parent 4a1e32a commit 655a161
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
49 changes: 49 additions & 0 deletions tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -3808,6 +3808,55 @@ y;
================================================================================
`;
exports[`multi-comments-2.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
const x = 0;
/* istanbul ignore if */ // debug case currently not triggered
if (true) {
x;
}
=====================================output=====================================
const x = 0
/* istanbul ignore if */ // debug case currently not triggered
if (true) {
x
}
================================================================================
`;
exports[`multi-comments-2.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
const x = 0;
/* istanbul ignore if */ // debug case currently not triggered
if (true) {
x;
}
=====================================output=====================================
const x = 0;
/* istanbul ignore if */ // debug case currently not triggered
if (true) {
x;
}
================================================================================
`;
exports[`multi-comments-on-same-line.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
Expand Down
6 changes: 6 additions & 0 deletions tests/format/js/comments/multi-comments-2.js
@@ -0,0 +1,6 @@
const x = 0;

/* istanbul ignore if */ // debug case currently not triggered
if (true) {
x;
}

0 comments on commit 655a161

Please sign in to comment.