diff --git a/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap index 7078a9076e6b..9c21079b109f 100644 --- a/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap @@ -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"] diff --git a/tests/format/js/comments/multi-comments-2.js b/tests/format/js/comments/multi-comments-2.js new file mode 100644 index 000000000000..a6e34e549a6d --- /dev/null +++ b/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; + }