Skip to content

Commit 3e81f08

Browse files
committed
add single-line object destructuring test case
1 parent b7c0450 commit 3e81f08

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/cases/fourslash/formattingInDestructuring3.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
/////*1*/const {
44
/////*2*/ a,
55
/////*3*/ b,
6-
/////*4*/} = { a: 1, b: 2 };
6+
/////*4*/} = {a: 1, b: 2};
7+
/////*5*/const {a: c} = {a: 1, b: 2};
78

89
format.document();
910

@@ -14,4 +15,6 @@ verify.currentLineContentIs(" a,");
1415
goTo.marker("3");
1516
verify.currentLineContentIs(" b,");
1617
goTo.marker("4");
17-
verify.currentLineContentIs("} = { a: 1, b: 2 };");
18+
verify.currentLineContentIs("} = { a: 1, b: 2 };");
19+
goTo.marker("5");
20+
verify.currentLineContentIs("const { a: c } = { a: 1, b: 2 };");

0 commit comments

Comments
 (0)