diff --git a/test/fixtures/transformation/es6-destructuring/chained/exec.js b/test/fixtures/transformation/es6-destructuring/chained/exec.js index fca8b7ab2a..08f282a7b0 100644 --- a/test/fixtures/transformation/es6-destructuring/chained/exec.js +++ b/test/fixtures/transformation/es6-destructuring/chained/exec.js @@ -1,5 +1,5 @@ var a, b, c, d; -({a,b}) = {c,d} = {a:1,b:2,c:3,d:4}; +({ a, b } = { c, d } = { a: 1, b: 2, c: 3, d: 4}); assert.equal(a, 1); assert.equal(b, 2); assert.equal(c, 3); diff --git a/test/fixtures/transformation/es6-destructuring/known-array/actual.js b/test/fixtures/transformation/es6-destructuring/known-array/actual.js index 8975797007..f853dccade 100644 --- a/test/fixtures/transformation/es6-destructuring/known-array/actual.js +++ b/test/fixtures/transformation/es6-destructuring/known-array/actual.js @@ -1 +1,2 @@ +var z = []; let [x, ...y] = z; diff --git a/test/fixtures/transformation/es6-destructuring/known-array/expected.js b/test/fixtures/transformation/es6-destructuring/known-array/expected.js index 5ff98bb88f..978eb7ad85 100644 --- a/test/fixtures/transformation/es6-destructuring/known-array/expected.js +++ b/test/fixtures/transformation/es6-destructuring/known-array/expected.js @@ -1,9 +1,5 @@ "use strict"; -var _toArray = function (arr) { return Array.isArray(arr) ? arr : Array.from(arr); }; - -var _z = _toArray(z); - -var x = _z[0]; - -var y = _z.slice(1); +var z = []; +var x = z[0]; +var y = z.slice(1); \ No newline at end of file diff --git a/test/fixtures/transformation/es6-destructuring/spread/actual.js b/test/fixtures/transformation/es6-destructuring/spread/actual.js index 0ef8f028ed..149c5c82b3 100644 --- a/test/fixtures/transformation/es6-destructuring/spread/actual.js +++ b/test/fixtures/transformation/es6-destructuring/spread/actual.js @@ -1,5 +1,5 @@ -var isSorted = ([x, y, ...wow]) => { +function isSorted([x, y, ...wow]) { if (!zs.length) return true if (y > x) return isSorted(zs) return false -}; +} diff --git a/test/fixtures/transformation/es6-destructuring/spread/expected.js b/test/fixtures/transformation/es6-destructuring/spread/expected.js index ae05dd65fd..75f6fa8ced 100644 --- a/test/fixtures/transformation/es6-destructuring/spread/expected.js +++ b/test/fixtures/transformation/es6-destructuring/spread/expected.js @@ -1,16 +1,13 @@ "use strict"; -var _toArray = function (arr) { return Array.isArray(arr) ? arr : Array.from(arr); }; - -var isSorted = function (_ref) { - var _ref2 = _toArray(_ref); +function isSorted(_ref) { + var _ref2 = babelHelpers.toArray(_ref); var x = _ref2[0]; var y = _ref2[1]; - var wow = _ref2.slice(2); if (!zs.length) return true; if (y > x) return isSorted(zs); return false; -}; +} diff --git a/test/fixtures/transformation/es6-for-of/multiple/expected.js b/test/fixtures/transformation/es6-for-of/multiple/expected.js index 77198f571c..9622e63af3 100644 --- a/test/fixtures/transformation/es6-for-of/multiple/expected.js +++ b/test/fixtures/transformation/es6-for-of/multiple/expected.js @@ -44,4 +44,4 @@ try { throw _iteratorError2; } } -} \ No newline at end of file +} diff --git a/test/fixtures/transformation/es7-comprehensions/array-multiple-if/expected.js b/test/fixtures/transformation/es7-comprehensions/array-multiple-if/expected.js index 1035cc83c7..099cb320f3 100644 --- a/test/fixtures/transformation/es7-comprehensions/array-multiple-if/expected.js +++ b/test/fixtures/transformation/es7-comprehensions/array-multiple-if/expected.js @@ -52,4 +52,4 @@ var seattlers = (function () { } return _seattlers; -})(); \ No newline at end of file +})(); diff --git a/test/fixtures/transformation/es7-comprehensions/array-multiple/expected.js b/test/fixtures/transformation/es7-comprehensions/array-multiple/expected.js index edecba1445..1989675a23 100644 --- a/test/fixtures/transformation/es7-comprehensions/array-multiple/expected.js +++ b/test/fixtures/transformation/es7-comprehensions/array-multiple/expected.js @@ -9,6 +9,7 @@ var arr = (function () { try { for (var _iterator = "abcdefgh".split("")[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var x = _step.value; + var _iteratorNormalCompletion2 = true; var _didIteratorError2 = false; var _iteratorError2 = undefined; @@ -50,4 +51,4 @@ var arr = (function () { } return _arr; -})(); \ No newline at end of file +})();