Reorganize some JSX-related tests (#12502)
This commit is contained in:
parent
1bba1b6da3
commit
581aeb9a23
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
"external-helpers",
|
||||||
|
"syntax-jsx",
|
||||||
|
"transform-react-jsx",
|
||||||
|
"transform-react-display-name",
|
||||||
|
"transform-arrow-functions"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,6 +0,0 @@
|
|||||||
<Foo></Foo>;
|
|
||||||
|
|
||||||
var profile = <div>
|
|
||||||
<img src="avatar.png" className="profile" />
|
|
||||||
<h3>{[user.firstName, user.lastName].join(" ")}</h3>
|
|
||||||
</div>;
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
||||||
import { jsx as _jsx } from "react/jsx-runtime";
|
|
||||||
|
|
||||||
/*#__PURE__*/
|
|
||||||
_jsx(Foo, {});
|
|
||||||
|
|
||||||
var profile = /*#__PURE__*/_jsxs("div", {
|
|
||||||
children: [/*#__PURE__*/_jsx("img", {
|
|
||||||
src: "avatar.png",
|
|
||||||
className: "profile"
|
|
||||||
}), /*#__PURE__*/_jsx("h3", {
|
|
||||||
children: [user.firstName, user.lastName].join(" ")
|
|
||||||
})]
|
|
||||||
});
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
/** @jsx foo */
|
|
||||||
/** @jsx bar */
|
|
||||||
|
|
||||||
var div = <div>test</div>;
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"throws": "pragma and pragmaFrag cannot be set when runtime is automatic."
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
var x = (
|
|
||||||
<div>
|
|
||||||
{/* A comment at the beginning */}
|
|
||||||
{/* A second comment at the beginning */}
|
|
||||||
<span>
|
|
||||||
{/* A nested comment */}
|
|
||||||
</span>
|
|
||||||
{/* A sandwiched comment */}
|
|
||||||
<br />
|
|
||||||
{/* A comment at the end */}
|
|
||||||
{/* A second comment at the end */}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
<Component
|
|
||||||
{...props}
|
|
||||||
sound="moo" />
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
/*#__PURE__*/
|
|
||||||
React.createElement(Component, { ...props,
|
|
||||||
sound: "moo"
|
|
||||||
});
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
var foo = function () {
|
|
||||||
return () => <this />;
|
|
||||||
};
|
|
||||||
|
|
||||||
var bar = function () {
|
|
||||||
return () => <this.foo />;
|
|
||||||
};
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
var foo = function () {
|
|
||||||
var _this = this;
|
|
||||||
|
|
||||||
return function () {
|
|
||||||
return /*#__PURE__*/React.createElement(_this, null);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
var bar = function () {
|
|
||||||
var _this2 = this;
|
|
||||||
|
|
||||||
return function () {
|
|
||||||
return /*#__PURE__*/React.createElement(_this2.foo, null);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
var div = /*#__PURE__*/React.createElement(Component, { ...props,
|
|
||||||
foo: "bar"
|
|
||||||
});
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
var x =
|
|
||||||
<div>
|
|
||||||
foo
|
|
||||||
{"bar"}
|
|
||||||
baz
|
|
||||||
<div>
|
|
||||||
buz
|
|
||||||
bang
|
|
||||||
</div>
|
|
||||||
qux
|
|
||||||
{null}
|
|
||||||
quack
|
|
||||||
</div>
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
var x = /*#__PURE__*/React.createElement("div", null, "foo", "bar", "baz", /*#__PURE__*/React.createElement("div", null, "buz bang"), "qux", null, "quack");
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"plugins": [
|
|
||||||
["transform-react-jsx", { "runtime": "automatic" }]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
<Text>
|
|
||||||
To get started, edit index.ios.js!!!{"\n"}
|
|
||||||
Press Cmd+R to reload
|
|
||||||
</Text>
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
/*#__PURE__*/
|
|
||||||
React.createElement(Text, null, "To get started, edit index.ios.js!!!", "\n", "Press Cmd+R to reload");
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
/** @jsx dom */
|
|
||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
<Foo></Foo>;
|
|
||||||
|
|
||||||
var profile = <div>
|
|
||||||
<img src="avatar.png" className="profile" />
|
|
||||||
<h3>{[user.firstName, user.lastName].join(" ")}</h3>
|
|
||||||
</div>;
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"plugins": [
|
|
||||||
["transform-react-jsx", { "pragma": "foo.bar", "runtime": "automatic" }]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
/** @jsx dom */
|
|
||||||
|
|
||||||
/** @jsxRuntime classic */
|
|
||||||
dom(Foo, null);
|
|
||||||
var profile = dom("div", null, dom("img", {
|
|
||||||
src: "avatar.png",
|
|
||||||
className: "profile"
|
|
||||||
}), dom("h3", null, [user.firstName, user.lastName].join(" ")));
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
/** @jsx dom */
|
|
||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
<Foo></Foo>;
|
|
||||||
|
|
||||||
var profile = <div>
|
|
||||||
<img src="avatar.png" className="profile" />
|
|
||||||
<h3>{[user.firstName, user.lastName].join(" ")}</h3>
|
|
||||||
</div>;
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
/** @jsx dom */
|
|
||||||
|
|
||||||
/** @jsxRuntime classic */
|
|
||||||
dom(Foo, null);
|
|
||||||
var profile = dom("div", null, dom("img", {
|
|
||||||
src: "avatar.png",
|
|
||||||
className: "profile"
|
|
||||||
}), dom("h3", null, [user.firstName, user.lastName].join(" ")));
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
<Foo></Foo>;
|
|
||||||
|
|
||||||
var profile = <div>
|
|
||||||
<img src="avatar.png" className="profile" />
|
|
||||||
<h3>{[user.firstName, user.lastName].join(" ")}</h3>
|
|
||||||
</div>;
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"plugins": [
|
|
||||||
["transform-react-jsx", { "pragma": "dom", "runtime": "automatic" }]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
dom(Foo, null);
|
|
||||||
var profile = dom("div", null, dom("img", {
|
|
||||||
src: "avatar.png",
|
|
||||||
className: "profile"
|
|
||||||
}), dom("h3", null, [user.firstName, user.lastName].join(" ")));
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"retainLines": true
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
var div = /*#__PURE__*/React.createElement("div", null, "test");
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
var div = <div>test</div>;
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
var div = /*#__PURE__*/React.createElement("div", null, "test");
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
/* @jsx foo*/
|
|
||||||
/* @jsxRuntime classic*/
|
|
||||||
<div>Hi</div>;
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
/* @jsx foo*/
|
|
||||||
|
|
||||||
/* @jsxRuntime classic*/
|
|
||||||
foo("div", null, "Hi");
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
var es3 = <F aaa new const var default foo-bar/>;
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"plugins": [
|
|
||||||
["transform-react-jsx", { "runtime": "automatic" }],
|
|
||||||
"transform-property-literals"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
var es3 = /*#__PURE__*/React.createElement(F, {
|
|
||||||
aaa: true,
|
|
||||||
"new": true,
|
|
||||||
"const": true,
|
|
||||||
"var": true,
|
|
||||||
"default": true,
|
|
||||||
"foo-bar": true
|
|
||||||
});
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
<Component constructor="foo" />;
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
/*#__PURE__*/
|
|
||||||
React.createElement(Component, {
|
|
||||||
constructor: "foo"
|
|
||||||
});
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
<Namespace.DeepNamespace.Component />;
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
/*#__PURE__*/
|
|
||||||
React.createElement(Namespace.DeepNamespace.Component, null);
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
<div attr=<div /> />
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
/*#__PURE__*/
|
|
||||||
React.createElement("div", {
|
|
||||||
attr: /*#__PURE__*/React.createElement("div", null)
|
|
||||||
});
|
|
||||||
@ -1 +0,0 @@
|
|||||||
React.createElement(Namespace.Component, null);
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
<Namespace.Component />;
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
/*#__PURE__*/
|
|
||||||
React.createElement(Namespace.Component, null);
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
<div>
|
|
||||||
< >
|
|
||||||
<>
|
|
||||||
<span>Hello</span>
|
|
||||||
<span>world</span>
|
|
||||||
</>
|
|
||||||
<>
|
|
||||||
<span>Goodbye</span>
|
|
||||||
<span>world</span>
|
|
||||||
</>
|
|
||||||
</>
|
|
||||||
</div>
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
/*#__PURE__*/
|
|
||||||
React.createElement("div", null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "Hello"), /*#__PURE__*/React.createElement("span", null, "world")), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "Goodbye"), /*#__PURE__*/React.createElement("span", null, "world"))));
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
/** @jsx dom */
|
|
||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
<div>no fragment is used</div>
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
/** @jsx dom */
|
|
||||||
|
|
||||||
/** @jsxRuntime classic */
|
|
||||||
dom("div", null, "no fragment is used");
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
/** @jsx dom */
|
|
||||||
/** @jsxFrag DomFrag */
|
|
||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
<></>
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
/** @jsx dom */
|
|
||||||
|
|
||||||
/** @jsxFrag DomFrag */
|
|
||||||
|
|
||||||
/** @jsxRuntime classic */
|
|
||||||
dom(DomFrag, null);
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
var x = <div>
|
|
||||||
<Component />
|
|
||||||
</div>;
|
|
||||||
|
|
||||||
var x = <div>
|
|
||||||
{props.children}
|
|
||||||
</div>;
|
|
||||||
|
|
||||||
var x = <Composite>
|
|
||||||
{props.children}
|
|
||||||
</Composite>;
|
|
||||||
|
|
||||||
var x = <Composite>
|
|
||||||
<Composite2 />
|
|
||||||
</Composite>;
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
var x = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Component, null));
|
|
||||||
var x = /*#__PURE__*/React.createElement("div", null, props.children);
|
|
||||||
var x = /*#__PURE__*/React.createElement(Composite, null, props.children);
|
|
||||||
var x = /*#__PURE__*/React.createElement(Composite, null, /*#__PURE__*/React.createElement(Composite2, null));
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
|
|
||||||
var x = <div></div>;
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
/** @jsxRuntime classic */
|
|
||||||
var x = /*#__PURE__*/React.createElement("div", null);
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user