Reorganize some JSX-related tests (#12502)
This commit is contained in:
committed by
GitHub
parent
1bba1b6da3
commit
581aeb9a23
@@ -1,6 +0,0 @@
|
||||
var Component;
|
||||
Component = React.createClass({
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
@@ -1,7 +0,0 @@
|
||||
var Component;
|
||||
Component = React.createClass({
|
||||
displayName: "Component",
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
@@ -1,5 +0,0 @@
|
||||
export default React.createClass({
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
@@ -1,6 +0,0 @@
|
||||
export default React.createClass({
|
||||
displayName: "input",
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
@@ -1,13 +0,0 @@
|
||||
var Whateva = React.createClass({
|
||||
displayName: "Whatever",
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
var Bar = React.createClass({
|
||||
"displayName": "Ba",
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
@@ -1,12 +0,0 @@
|
||||
var Whateva = React.createClass({
|
||||
displayName: "Whatever",
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
var Bar = React.createClass({
|
||||
"displayName": "Ba",
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
@@ -1,7 +0,0 @@
|
||||
exports = {
|
||||
Component: React.createClass({
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
})
|
||||
};
|
||||
@@ -1,8 +0,0 @@
|
||||
exports = {
|
||||
Component: React.createClass({
|
||||
displayName: "Component",
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
})
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
exports.Component = React.createClass({
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
@@ -1,6 +0,0 @@
|
||||
exports.Component = React.createClass({
|
||||
displayName: "Component",
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
@@ -1,5 +0,0 @@
|
||||
var Component = React.createClass({
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
@@ -1,6 +0,0 @@
|
||||
var Component = React.createClass({
|
||||
displayName: "Component",
|
||||
render: function render() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
@@ -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,9 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
"external-helpers",
|
||||
"syntax-jsx",
|
||||
["transform-react-jsx", { "runtime": "automatic" }],
|
||||
"transform-react-display-name",
|
||||
"transform-arrow-functions"
|
||||
]
|
||||
}
|
||||
@@ -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);
|
||||
@@ -1,3 +0,0 @@
|
||||
/** @jsxRuntime classic */
|
||||
|
||||
var x = <div>text</div>;
|
||||
@@ -1,2 +0,0 @@
|
||||
/** @jsxRuntime classic */
|
||||
var x = /*#__PURE__*/React.createElement("div", null, "text");
|
||||
@@ -1,3 +0,0 @@
|
||||
/** @jsxRuntime classic */
|
||||
|
||||
<div>{...children}</div>;
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"throws": "Spread children are not supported in React."
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
/** @jsxRuntime classic */
|
||||
|
||||
<Namespace:Component />;
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"throws": "Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can set `throwIfNamespace: false` to bypass this warning."
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
/** @jsxRuntime classic */
|
||||
|
||||
<div id="wôw" />;
|
||||
<div id="\w" />;
|
||||
<div id="w < w" />;
|
||||
@@ -1,16 +0,0 @@
|
||||
/** @jsxRuntime classic */
|
||||
|
||||
/*#__PURE__*/
|
||||
React.createElement("div", {
|
||||
id: "w\xF4w"
|
||||
});
|
||||
|
||||
/*#__PURE__*/
|
||||
React.createElement("div", {
|
||||
id: "\\w"
|
||||
});
|
||||
|
||||
/*#__PURE__*/
|
||||
React.createElement("div", {
|
||||
id: "w < w"
|
||||
});
|
||||
@@ -1,14 +0,0 @@
|
||||
/** @jsxRuntime classic */
|
||||
|
||||
<div>wow</div>;
|
||||
<div>wôw</div>;
|
||||
|
||||
<div>w & w</div>;
|
||||
<div>w & w</div>;
|
||||
|
||||
<div>w w</div>;
|
||||
<div>this should not parse as unicode: \u00a0</div>;
|
||||
<div>this should parse as nbsp: </div>;
|
||||
<div>this should parse as unicode: {'\u00a0 '}</div>;
|
||||
|
||||
<div>w < w</div>;
|
||||
@@ -1,28 +0,0 @@
|
||||
/** @jsxRuntime classic */
|
||||
|
||||
/*#__PURE__*/
|
||||
React.createElement("div", null, "wow");
|
||||
|
||||
/*#__PURE__*/
|
||||
React.createElement("div", null, "w\xF4w");
|
||||
|
||||
/*#__PURE__*/
|
||||
React.createElement("div", null, "w & w");
|
||||
|
||||
/*#__PURE__*/
|
||||
React.createElement("div", null, "w & w");
|
||||
|
||||
/*#__PURE__*/
|
||||
React.createElement("div", null, "w \xA0 w");
|
||||
|
||||
/*#__PURE__*/
|
||||
React.createElement("div", null, "this should not parse as unicode: \\u00a0");
|
||||
|
||||
/*#__PURE__*/
|
||||
React.createElement("div", null, "this should parse as nbsp: \xA0 ");
|
||||
|
||||
/*#__PURE__*/
|
||||
React.createElement("div", null, "this should parse as unicode: ", '\u00a0 ');
|
||||
|
||||
/*#__PURE__*/
|
||||
React.createElement("div", null, "w < w");
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @jsxRuntime classic */
|
||||
|
||||
var HelloMessage = React.createClass({
|
||||
render: function() {
|
||||
return <div>Hello {this.props.name}</div>;
|
||||
}
|
||||
});
|
||||
|
||||
React.render(<HelloMessage name={
|
||||
<span>
|
||||
Sebastian
|
||||
</span>
|
||||
} />, mountNode);
|
||||
@@ -1,10 +0,0 @@
|
||||
/** @jsxRuntime classic */
|
||||
var HelloMessage = React.createClass({
|
||||
displayName: "HelloMessage",
|
||||
render: function () {
|
||||
return /*#__PURE__*/React.createElement("div", null, "Hello ", this.props.name);
|
||||
}
|
||||
});
|
||||
React.render( /*#__PURE__*/React.createElement(HelloMessage, {
|
||||
name: /*#__PURE__*/React.createElement("span", null, "Sebastian")
|
||||
}), mountNode);
|
||||
@@ -1,3 +0,0 @@
|
||||
/** @jsxRuntime classic */
|
||||
|
||||
<hasOwnProperty>testing</hasOwnProperty>;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user