Skip to content

Commit

Permalink
Add test for #139
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine committed Oct 10, 2018
1 parent e852a23 commit 978f9fa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/samples/destructuring.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,5 +888,20 @@ module.exports = [
var assign;
if (from) { (assign = [to, from], from = assign[0], to = assign[1]) }`
},

{
description: 'destructuring nested computed properties',

options: {
objectAssign: 'Object.assign'
},

input: `var z1 = { [b]: { ...c, [d]: 'Hello, World!' } }`,

output: `
var obj;
var z1 = {};
z1[b] = Object.assign({}, c, ( obj = {}, obj[d] = 'Hello, World!', obj ))`
}
];

0 comments on commit 978f9fa

Please sign in to comment.