Skip to content

Commit

Permalink
Add a test for swc-project#1477
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Apr 1, 2021
1 parent af847a7 commit 20df84e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ecmascript/transforms/compat/tests/es2015_destructuring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1518,3 +1518,18 @@ test!(
_b = _slicedToArray(b, 1), _b$0$a = _b[0].a, a_ = _b$0$a === void 0 ? 1 : _b$0$a;
"
);

test!(
syntax(),
|_| tr(),
issue_1477_3,
"
const [ a = 1 ] = b
",
"
var _b = b,
_b2 = _slicedToArray(_b, 1),
_b2$ = _b2[0],
a = _b2$ === void 0 ? 1 : _b2$;
"
);

0 comments on commit 20df84e

Please sign in to comment.