From b4761d1ffbb681f38222223e16306df2a1bd5305 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Wed, 21 Jan 2026 09:06:39 +0800 Subject: [PATCH] Add test for #11273 (#18694) --- tests/format/js/comments/11273.js | 3 ++ .../__snapshots__/format.test.js.snap | 37 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 tests/format/js/comments/11273.js diff --git a/tests/format/js/comments/11273.js b/tests/format/js/comments/11273.js new file mode 100644 index 000000000..7130c38d6 --- /dev/null +++ b/tests/format/js/comments/11273.js @@ -0,0 +1,3 @@ +1; +/**/ /* +x */ diff --git a/tests/format/js/comments/__snapshots__/format.test.js.snap b/tests/format/js/comments/__snapshots__/format.test.js.snap index 045e45d16..dfae9738b 100644 --- a/tests/format/js/comments/__snapshots__/format.test.js.snap +++ b/tests/format/js/comments/__snapshots__/format.test.js.snap @@ -1,5 +1,42 @@ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing +exports[`11273.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +1; +/**/ /* +x */ + +=====================================output===================================== +1 +/**/ /* +x */ + +================================================================================ +`; + +exports[`11273.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +1; +/**/ /* +x */ + +=====================================output===================================== +1; +/**/ /* +x */ + +================================================================================ +`; + exports[`15661.js - {"semi":false} format 1`] = ` ====================================options===================================== parsers: ["babel", "flow", "typescript"]