Skip to content

Commit 8450dee

Browse files
committed
Add tests
1 parent 4e338cc commit 8450dee

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

tests/syntax_tests/data/printer/comments/array.res

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,20 @@ let _ = (
1515
->Belt.SortArray.stableSortBy((a, b) =>
1616
compare(a.createdTime, b.createdTime)
1717
)
18-
)[0]
18+
)[0]
19+
20+
let _ = [
21+
// comment 1
22+
a,
23+
// comment 2
24+
b,
25+
// comment 3
26+
c
27+
]
28+
29+
let _ = [
30+
// comment 1
31+
a,
32+
// comment 2
33+
b, c
34+
]

tests/syntax_tests/data/printer/comments/expected/array.res.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,20 @@ let _ = a[0] // zz
1010
// This comment will vanish
1111
->Belt.SortArray.stableSortBy((a, b) => compare(a.createdTime, b.createdTime))
1212
)[0]
13+
14+
let _ = [
15+
// comment 1
16+
a,
17+
// comment 2
18+
b,
19+
// comment 3
20+
c,
21+
]
22+
23+
let _ = [
24+
// comment 1
25+
a,
26+
// comment 2
27+
b,
28+
c,
29+
]

0 commit comments

Comments
 (0)