diff --git a/test/fixtures/transformation/es7-object-spread/assignment/expected.js b/test/fixtures/transformation/es7-object-spread/assignment/expected.js index 7768f0f858..55e8e562b3 100644 --- a/test/fixtures/transformation/es7-object-spread/assignment/expected.js +++ b/test/fixtures/transformation/es7-object-spread/assignment/expected.js @@ -1,5 +1,5 @@ "use strict"; -var _extends = function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; z = _extends({ x: x }, y); diff --git a/test/fixtures/transformation/es7-object-spread/expression/expected.js b/test/fixtures/transformation/es7-object-spread/expression/expected.js index f2671698d9..6473abeefa 100644 --- a/test/fixtures/transformation/es7-object-spread/expression/expected.js +++ b/test/fixtures/transformation/es7-object-spread/expression/expected.js @@ -1,5 +1,5 @@ "use strict"; -var _extends = function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; _extends({ x: x }, y, { a: a }, b, { c: c }); diff --git a/test/fixtures/transformation/es7-object-spread/variable-declaration/expected.js b/test/fixtures/transformation/es7-object-spread/variable-declaration/expected.js index ceb256a198..4180a0fdb0 100644 --- a/test/fixtures/transformation/es7-object-spread/variable-declaration/expected.js +++ b/test/fixtures/transformation/es7-object-spread/variable-declaration/expected.js @@ -1,5 +1,5 @@ "use strict"; -var _extends = function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var z = _extends({}, x); diff --git a/test/fixtures/transformation/react/adds-appropriate-newlines-when-using-spread-attribute/expected.js b/test/fixtures/transformation/react/adds-appropriate-newlines-when-using-spread-attribute/expected.js index 46962e2c4b..1d60d633e3 100644 --- a/test/fixtures/transformation/react/adds-appropriate-newlines-when-using-spread-attribute/expected.js +++ b/test/fixtures/transformation/react/adds-appropriate-newlines-when-using-spread-attribute/expected.js @@ -1,4 +1,4 @@ -var _extends = function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; React.createElement(Component, _extends({}, props, { sound: "moo" })); diff --git a/test/fixtures/transformation/react/wraps-props-in-react-spread-for-first-spread-attributes/expected.js b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-first-spread-attributes/expected.js index 4d3fb939fd..ba6253f282 100644 --- a/test/fixtures/transformation/react/wraps-props-in-react-spread-for-first-spread-attributes/expected.js +++ b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-first-spread-attributes/expected.js @@ -1,3 +1,3 @@ -var _extends = function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; React.createElement(Component, _extends({}, x, { y: 2, z: true })); diff --git a/test/fixtures/transformation/react/wraps-props-in-react-spread-for-last-spread-attributes/expected.js b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-last-spread-attributes/expected.js index e64b5a25f6..12571fc335 100644 --- a/test/fixtures/transformation/react/wraps-props-in-react-spread-for-last-spread-attributes/expected.js +++ b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-last-spread-attributes/expected.js @@ -1,3 +1,3 @@ -var _extends = function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; React.createElement(Component, _extends({ y: 2, z: true }, x)); diff --git a/test/fixtures/transformation/react/wraps-props-in-react-spread-for-middle-spread-attributes/expected.js b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-middle-spread-attributes/expected.js index fff0428c83..de3276b168 100644 --- a/test/fixtures/transformation/react/wraps-props-in-react-spread-for-middle-spread-attributes/expected.js +++ b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-middle-spread-attributes/expected.js @@ -1,3 +1,3 @@ -var _extends = function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; React.createElement(Component, _extends({ y: 2 }, x, { z: true })); diff --git a/test/fixtures/transformation/spec-proto-to-assign/object-literal/expected.js b/test/fixtures/transformation/spec-proto-to-assign/object-literal/expected.js index 6719a974ce..de88a93d98 100644 --- a/test/fixtures/transformation/spec-proto-to-assign/object-literal/expected.js +++ b/test/fixtures/transformation/spec-proto-to-assign/object-literal/expected.js @@ -1,6 +1,6 @@ "use strict"; -var _extends = function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var foo = _extends({}, bar);