Skip to content

Commit

Permalink
I found the way to use fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Nov 23, 2020
1 parent 1cd35fe commit 3b0e93e
Show file tree
Hide file tree
Showing 187 changed files with 1,209 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class App extends React.Component {
render() {
const navbarHeader = <div className="navbar-header">
<a className="navbar-brand" href="/">
<img src="/img/logo/logo-96x36.png" />
</a>
</div>;

return <div>
<nav className="navbar navbar-default">
<div className="container">
{navbarHeader}
</div>
</nav>
</div>;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"plugins": [
["external-helpers", { "helperVersion": "7.100.0" }],
"transform-react-constant-elements",
"transform-classes",
"syntax-jsx"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
var _ref = <div className="navbar-header">
<a className="navbar-brand" href="/">
<img src="/img/logo/logo-96x36.png" />
</a>
</div>;

let App = /*#__PURE__*/function (_React$Component) {
babelHelpers.inherits(App, _React$Component);

var _super = babelHelpers.createSuper(App);

function App() {
babelHelpers.classCallCheck(this, App);
return _super.apply(this, arguments);
}

babelHelpers.createClass(App, [{
key: "render",
value: function render() {
const navbarHeader = _ref;
return <div>
<nav className="navbar navbar-default">
<div className="container">
{navbarHeader}
</div>
</nav>
</div>;
}
}]);
return App;
}(React.Component);
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"plugins": [
"external-helpers",
["transform-react-jsx", { "runtime": "automatic" }],
"transform-react-display-name",
"transform-arrow-functions"
],
"sourceType": "module"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* @jsxImportSource foo*/
<div>Hi</div>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { jsx as _jsx } from "foo/jsx-runtime";

/* @jsxImportSource foo*/
_jsx("div", {
children: "Hi"
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var es3 = <F aaa new const var default foo-bar/>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"plugins": [
["transform-react-jsx", { "runtime": "automatic" }],
"transform-property-literals"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { jsx as _jsx } from "react/jsx-runtime";

var es3 = /*#__PURE__*/_jsx(F, {
aaa: true,
"new": true,
"const": true,
"var": true,
"default": true,
"foo-bar": true
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<Component constructor="foo" />;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { jsx as _jsx } from "react/jsx-runtime";

/*#__PURE__*/
_jsx(Component, {
constructor: "foo"
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<Namespace.DeepNamespace.Component />;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { jsx as _jsx } from "react/jsx-runtime";

/*#__PURE__*/
_jsx(Namespace.DeepNamespace.Component, {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div attr=<div /> />
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { jsx as _jsx } from "react/jsx-runtime";

/*#__PURE__*/
_jsx("div", {
attr: /*#__PURE__*/_jsx("div", {})
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
React.createElement(Namespace.Component, null);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<Namespace.Component />;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { jsx as _jsx } from "react/jsx-runtime";

/*#__PURE__*/
_jsx(Namespace.Component, {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div>
< >
<>
<span>Hello</span>
<span>world</span>
</>
<>
<span>Goodbye</span>
<span>world</span>
</>
</>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { jsxs as _jsxs } from "react/jsx-runtime";
import { Fragment as _Fragment } from "react/jsx-runtime";
import { jsx as _jsx } from "react/jsx-runtime";

/*#__PURE__*/
_jsx("div", {
children: /*#__PURE__*/_jsxs(_Fragment, {
children: [/*#__PURE__*/_jsxs(_Fragment, {
children: [/*#__PURE__*/_jsx("span", {
children: "Hello"
}), /*#__PURE__*/_jsx("span", {
children: "world"
})]
}), /*#__PURE__*/_jsxs(_Fragment, {
children: [/*#__PURE__*/_jsx("span", {
children: "Goodbye"
}), /*#__PURE__*/_jsx("span", {
children: "world"
})]
})]
})
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var x = <div>
<Component />
</div>;

var x = <div>
{props.children}
</div>;

var x = <Composite>
{props.children}
</Composite>;

var x = <Composite>
<Composite2 />
</Composite>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { jsx as _jsx } from "react/jsx-runtime";

var x = /*#__PURE__*/_jsx("div", {
children: /*#__PURE__*/_jsx(Component, {})
});

var x = /*#__PURE__*/_jsx("div", {
children: props.children
});

var x = /*#__PURE__*/_jsx(Composite, {
children: props.children
});

var x = /*#__PURE__*/_jsx(Composite, {
children: /*#__PURE__*/_jsx(Composite2, {})
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var x = <div></div>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { jsx as _jsx } from "react/jsx-runtime";

var x = /*#__PURE__*/_jsx("div", {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var x = <div>text</div>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { jsx as _jsx } from "react/jsx-runtime";

var x = /*#__PURE__*/_jsx("div", {
children: "text"
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div>{...children}</div>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"throws": "Spread children are not supported in React."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<Namespace:Component />;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"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."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div id="wôw" />;
<div id="\w" />;
<div id="w &lt; w" />;
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { jsx as _jsx } from "react/jsx-runtime";

/*#__PURE__*/
_jsx("div", {
id: "w\xF4w"
});

/*#__PURE__*/
_jsx("div", {
id: "\\w"
});

/*#__PURE__*/
_jsx("div", {
id: "w < w"
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div>wow</div>;
<div>wôw</div>;

<div>w & w</div>;
<div>w &amp; w</div>;

<div>w &nbsp; 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 &lt; w</div>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { jsxs as _jsxs } from "react/jsx-runtime";
import { jsx as _jsx } from "react/jsx-runtime";

/*#__PURE__*/
_jsx("div", {
children: "wow"
});

/*#__PURE__*/
_jsx("div", {
children: "w\xF4w"
});

/*#__PURE__*/
_jsx("div", {
children: "w & w"
});

/*#__PURE__*/
_jsx("div", {
children: "w & w"
});

/*#__PURE__*/
_jsx("div", {
children: "w \xA0 w"
});

/*#__PURE__*/
_jsx("div", {
children: "this should not parse as unicode: \\u00a0"
});

/*#__PURE__*/
_jsx("div", {
children: "this should parse as nbsp: \xA0 "
});

/*#__PURE__*/
_jsxs("div", {
children: ["this should parse as unicode: ", '\u00a0 ']
});

/*#__PURE__*/
_jsx("div", {
children: "w < w"
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var HelloMessage = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
});

React.render(<HelloMessage name={
<span>
Sebastian
</span>
} />, mountNode);
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
var HelloMessage = React.createClass({
displayName: "HelloMessage",
render: function () {
return /*#__PURE__*/_jsxs("div", {
children: ["Hello ", this.props.name]
});
}
});
React.render( /*#__PURE__*/_jsx(HelloMessage, {
name: /*#__PURE__*/_jsx("span", {
children: "Sebastian"
})
}), mountNode);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<hasOwnProperty>testing</hasOwnProperty>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { jsx as _jsx } from "react/jsx-runtime";

/*#__PURE__*/
_jsx("hasOwnProperty", {
children: "testing"
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var x = <div>
<div><br /></div>
<Component>{foo}<br />{bar}</Component>
<br />
</div>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";

var x = /*#__PURE__*/_jsxs("div", {
children: [/*#__PURE__*/_jsx("div", {
children: /*#__PURE__*/_jsx("br", {})
}), /*#__PURE__*/_jsxs(Component, {
children: [foo, /*#__PURE__*/_jsx("br", {}), bar]
}), /*#__PURE__*/_jsx("br", {})]
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var x =
<div
attr1={
"foo" + "bar"
}
attr2={
"foo" + "bar" +

"baz" + "bug"
}
attr3={
"foo" + "bar" +
"baz" + "bug"
}
attr4="baz">
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { jsx as _jsx } from "react/jsx-runtime";

var x = /*#__PURE__*/_jsx("div", {
attr1: "foo" + "bar",
attr2: "foo" + "bar" + "baz" + "bug",
attr3: "foo" + "bar" + "baz" + "bug",
attr4: "baz"
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var e = <F aaa new const var default foo-bar/>;
Loading

0 comments on commit 3b0e93e

Please sign in to comment.