Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
☀️ committed Apr 23, 2023
1 parent 5ca44e9 commit 8022b18
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
62 changes: 62 additions & 0 deletions tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,39 @@ a = [
]
_ = [
a,
b //
]
_ = [
(a),
b, //
];
_ = [
(((((
a = b/* comment */))/* comment */))),
c //
]
_ = [
(((((
(a = b)/* comment */))/* comment */))),
c //
]
_ = [
(a=b
),
b, //
];
=====================================output=====================================
a = [
1, 2,
Expand All @@ -853,6 +886,35 @@ a = [
4,
];
_ = [
a,
b, //
];
_ = [
a,
b, //
];
_ = [
(a = b) /* comment */ /* comment */,
c, //
];
_ = [
(a = b) /* comment */ /* comment */,
c, //
];
_ = [
(a = b),
b, //
];
================================================================================
`;
Expand Down
33 changes: 33 additions & 0 deletions tests/format/js/arrays/preserve_empty_lines.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,36 @@ a = [


]

_ = [
a,

b //
]

_ = [
(a),

b, //
];

_ = [
(((((
a = b/* comment */))/* comment */))),

c //
]

_ = [
(((((
(a = b)/* comment */))/* comment */))),

c //
]

_ = [
(a=b

),
b, //
];

0 comments on commit 8022b18

Please sign in to comment.