Add regression test for blank lines between statements (#19380)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-06-16 05:31:37 +08:00
1 parent 99b43f1527
commit 701280af57
3 files changed
+150

No files matched your search

@@ -1,5 +1,104 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`blank-lines.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "flow"]
semi: false
printWidth: 80 (default) |
=====================================input======================================
const a1=foo
.bar()
;
bar();
const a2=foo
.bar()
;
+bar();
a=foo
.bar()
;
bar();
a=foo
.bar()
;
+bar();
=====================================output=====================================
const a1 = foo.bar()
bar()
const a2 = foo.bar()
;+bar()
a = foo.bar()
bar()
a = foo.bar()
;+bar()
================================================================================
`;
exports[`blank-lines.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "flow"]
printWidth: 80 (default) |
=====================================input======================================
const a1=foo
.bar()
;
bar();
const a2=foo
.bar()
;
+bar();
a=foo
.bar()
;
bar();
a=foo
.bar()
;
+bar();
=====================================output=====================================
const a1 = foo.bar();
bar();
const a2 = foo.bar();
+bar();
a = foo.bar();
bar();
a = foo.bar();
+bar();
================================================================================
`;
exports[`class.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "flow"]
+23
View File
@@ -0,0 +1,23 @@
const a1=foo
.bar()
;
bar();
const a2=foo
.bar()
;
+bar();
a=foo
.bar()
;
bar();
a=foo
.bar()
;
+bar();