Enable external-helpers by default in tests (#12911)

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
This commit is contained in:
Nicolò Ribaudo
2021-02-26 23:33:26 +01:00
committed by GitHub
parent bfd30b9445
commit ea6a438315
591 changed files with 1859 additions and 4233 deletions

View File

@@ -1,10 +1,6 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
export default {
function(name) {
return _asyncToGenerator(function* () {
return babelHelpers.asyncToGenerator(function* () {
const uppercasedName = name.upperCase(); // awaits depending on uppercasedName go here
return <Foo name={uppercasedName} />;

View File

@@ -1,8 +1,4 @@
var REACT_ELEMENT_TYPE;
function _jsx(type, props, key, children) { if (!REACT_ELEMENT_TYPE) { REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol["for"] && Symbol["for"]("react.element") || 0xeac7; } var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = { children: void 0 }; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = new Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }
var _ref = /*#__PURE__*/_jsx("foo", {});
var _ref = /*#__PURE__*/babelHelpers.jsx("foo", {});
function render() {
return _ref;
@@ -11,7 +7,7 @@ function render() {
function render() {
var text = getText();
var _ref2 = /*#__PURE__*/_jsx("foo", {}, void 0, text);
var _ref2 = /*#__PURE__*/babelHelpers.jsx("foo", {}, void 0, text);
return function () {
return _ref2;

View File

@@ -4,7 +4,6 @@
"transform-parameters",
"transform-spread",
"transform-react-constant-elements",
"syntax-jsx",
"external-helpers"
"syntax-jsx"
]
}

View File

@@ -4,7 +4,6 @@
"transform-parameters",
"transform-spread",
"transform-react-constant-elements",
"syntax-jsx",
"external-helpers"
"syntax-jsx"
]
}