2017-02-22 00:59:19 +03:00
// Jest Snapshot v1, https://goo.gl/fbAQLP
2018-11-25 11:21:14 +03:00
exports[`test.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-04-12 23:41:51 +03:00
const render1 = ({ styles }) => (
<div style={styles} key="something">
2017-01-25 01:35:37 +03:00
Keep the wrapping parens. Put each key on its own line.
</div>
);
2017-04-12 23:41:51 +03:00
const render2 = ({ styles }) => <div style={styles} key="something">
2017-01-25 01:35:37 +03:00
Create wrapping parens.
</div>;
2017-07-05 09:45:06 +03:00
const render3 = ({ styles }) => <div style={styles} key="something">Create wrapping parens.</div>;
2017-01-25 01:35:37 +03:00
2017-04-12 23:41:51 +03:00
const render4 = ({ styles }) => <div style={styles} key="something">Create wrapping parens and indent <strong>all the things</strong>.</div>;
2017-01-25 01:35:37 +03:00
const render5 = ({ styles }) => <div>Keep it on one line.</div>;
const render6 = ({ styles }) => (
2017-04-12 23:41:51 +03:00
<div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc">
<div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc" attr4>ddd d dd d d dddd dddd <strong>hello</strong></div>
<div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc" attr4>ddd d dd d d dddd dddd <strong>hello</strong></div>
<div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc" attr4>
<div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc" attr4>ddd d dd d d dddd dddd <strong>hello</strong></div> <strong>hello</strong></div>
2017-01-25 01:35:37 +03:00
</div>
)
const render7 = () =>
<div>
<span /><span>Dont break each elem onto its own line.</span> <span />
<div /> <div />
</div>
const render7A = () => (
<div>
<div /><div /><div />
</div>
)
const render7B = () => (
<div>
<span> <span/> Dont break plz</span>
<span><span/>Dont break plz</span>
<span>Dont break plz<span/></span>
</div>
)
const render8 = (props) => <div>{props.text}</div>
const render9 = (props) => <div>{props.looooooooooooooooooooooooooooooong_text}</div>
const render10 = (props) => <div>{props.even_looooooooooooooooooooooooooooooooooooooooooonger_contents}</div>
const notJSX = (aaaaaaaaaaaaaaaaa, bbbbbbbbbbb) => this.someLongCallWithParams(aaaaaa, bbbbbbb).anotherLongCallWithParams(cccccccccccc, dddddddddddddddddddddd)
React.render(
2017-04-12 23:41:51 +03:00
<BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google" />
2017-02-22 00:59:19 +03:00
, document.querySelector('#react-root')
2017-01-25 01:35:37 +03:00
)
const renderTernary = (props) =>
2017-04-12 23:41:51 +03:00
<BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google">
2017-01-25 01:35:37 +03:00
{props.showTheThing ?
2017-04-12 23:41:51 +03:00
<BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google">Hello world</BaseForm>
: "hello " + "howdy! "}
2017-01-25 01:35:37 +03:00
{props.showTheThing ?
2017-04-12 23:41:51 +03:00
<BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google">Hello world</BaseForm>
2017-01-25 01:35:37 +03:00
:
null
}
{props.showTheThing ? null :
2017-04-12 23:41:51 +03:00
<BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google">Hello world</BaseForm>
2017-01-25 01:35:37 +03:00
}
2017-04-12 23:41:51 +03:00
{props.showTheOtherThing ? <div>I am here</div> : <div attr="blah" />}
2017-01-25 01:35:37 +03:00
{props.showTheOtherThing ? <div>I am here!!</div> : null}
</BaseForm>
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-07-05 09:45:06 +03:00
const render1 = ({ styles }) => (
2017-04-12 23:41:51 +03:00
<div style={styles} key="something">
2017-01-25 01:35:37 +03:00
Keep the wrapping parens. Put each key on its own line.
2017-07-05 09:45:06 +03:00
</div>
);
2017-01-25 01:35:37 +03:00
2017-07-05 09:45:06 +03:00
const render2 = ({ styles }) => (
2017-04-12 23:41:51 +03:00
<div style={styles} key="something">
2017-01-25 01:35:37 +03:00
Create wrapping parens.
2017-07-05 09:45:06 +03:00
</div>
);
2017-01-25 01:35:37 +03:00
2017-07-05 09:45:06 +03:00
const render3 = ({ styles }) => (
2017-06-22 19:19:44 +03:00
<div style={styles} key="something">
2017-07-05 09:45:06 +03:00
Create wrapping parens.
</div>
);
2017-01-25 01:35:37 +03:00
2017-07-05 09:45:06 +03:00
const render4 = ({ styles }) => (
2017-04-12 23:41:51 +03:00
<div style={styles} key="something">
2017-01-25 01:35:37 +03:00
Create wrapping parens and indent <strong>all the things</strong>.
2017-07-05 09:45:06 +03:00
</div>
);
2017-01-25 01:35:37 +03:00
const render5 = ({ styles }) => <div>Keep it on one line.</div>;
2017-07-05 09:45:06 +03:00
const render6 = ({ styles }) => (
2017-04-12 23:41:51 +03:00
<div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc">
2017-01-25 01:35:37 +03:00
<div
2017-04-12 23:41:51 +03:00
attr1="aaaaaaaaaaaaaaaaa"
attr2="bbbbbbbbbbb"
attr3="cccccccccccc"
2017-01-25 01:35:37 +03:00
attr4
>
ddd d dd d d dddd dddd <strong>hello</strong>
</div>
<div
2017-04-12 23:41:51 +03:00
attr1="aaaaaaaaaaaaaaaaa"
attr2="bbbbbbbbbbb"
attr3="cccccccccccc"
2017-01-25 01:35:37 +03:00
attr4
>
ddd d dd d d dddd dddd <strong>hello</strong>
</div>
<div
2017-04-12 23:41:51 +03:00
attr1="aaaaaaaaaaaaaaaaa"
attr2="bbbbbbbbbbb"
attr3="cccccccccccc"
2017-01-25 01:35:37 +03:00
attr4
>
<div
2017-04-12 23:41:51 +03:00
attr1="aaaaaaaaaaaaaaaaa"
attr2="bbbbbbbbbbb"
attr3="cccccccccccc"
2017-01-25 01:35:37 +03:00
attr4
>
ddd d dd d d dddd dddd <strong>hello</strong>
2017-06-05 23:52:54 +03:00
</div>{" "}
<strong>hello</strong>
2017-01-25 01:35:37 +03:00
</div>
2017-07-05 09:45:06 +03:00
</div>
);
2017-01-25 01:35:37 +03:00
2017-07-05 09:45:06 +03:00
const render7 = () => (
2017-01-25 01:35:37 +03:00
<div>
2017-06-26 19:30:52 +03:00
<span />
<span>Dont break each elem onto its own line.</span> <span />
<div /> <div />
2017-07-05 09:45:06 +03:00
</div>
);
2017-01-25 01:35:37 +03:00
2017-07-05 09:45:06 +03:00
const render7A = () => (
2017-01-25 01:35:37 +03:00
<div>
2017-06-22 19:19:44 +03:00
<div />
<div />
<div />
2017-07-05 09:45:06 +03:00
</div>
);
2017-01-25 01:35:37 +03:00
2017-07-05 09:45:06 +03:00
const render7B = () => (
2017-01-25 01:35:37 +03:00
<div>
2017-06-22 19:19:44 +03:00
<span>
2017-07-03 13:43:10 +03:00
{" "}
<span /> Dont break plz
2017-06-22 19:19:44 +03:00
</span>
<span>
2018-06-25 21:11:40 +03:00
<span />
Dont break plz
2017-06-22 19:19:44 +03:00
</span>
<span>
2018-06-25 21:11:40 +03:00
Dont break plz
<span />
2017-06-22 19:19:44 +03:00
</span>
2017-07-05 09:45:06 +03:00
</div>
);
2017-01-25 01:35:37 +03:00
2017-07-10 22:02:30 +03:00
const render8 = props => <div>{props.text}</div>;
2017-07-05 09:45:06 +03:00
const render9 = props => (
<div>{props.looooooooooooooooooooooooooooooong_text}</div>
);
const render10 = props => (
2017-01-25 01:35:37 +03:00
<div>
{props.even_looooooooooooooooooooooooooooooooooooooooooonger_contents}
2017-07-05 09:45:06 +03:00
</div>
);
2017-01-25 01:35:37 +03:00
const notJSX = (aaaaaaaaaaaaaaaaa, bbbbbbbbbbb) =>
2017-02-28 18:55:32 +03:00
this.someLongCallWithParams(aaaaaa, bbbbbbb).anotherLongCallWithParams(
cccccccccccc,
dddddddddddddddddddddd
);
2017-01-25 01:35:37 +03:00
React.render(
<BaseForm
2017-04-12 23:41:51 +03:00
url="/auth/google"
method="GET"
colour="blue"
size="large"
submitLabel="Sign in with Google"
2017-01-25 01:35:37 +03:00
/>,
2017-04-12 23:41:51 +03:00
document.querySelector("#react-root")
2017-01-25 01:35:37 +03:00
);
2017-07-05 09:45:06 +03:00
const renderTernary = props => (
2017-01-25 01:35:37 +03:00
<BaseForm
2017-04-12 23:41:51 +03:00
url="/auth/google"
method="GET"
colour="blue"
size="large"
submitLabel="Sign in with Google"
2017-01-25 01:35:37 +03:00
>
2017-07-05 09:45:06 +03:00
{props.showTheThing ? (
<BaseForm
url="/auth/google"
method="GET"
colour="blue"
size="large"
submitLabel="Sign in with Google"
>
Hello world
</BaseForm>
) : (
"hello " + "howdy! "
)}
{props.showTheThing ? (
<BaseForm
url="/auth/google"
method="GET"
colour="blue"
size="large"
submitLabel="Sign in with Google"
>
Hello world
</BaseForm>
2017-07-09 04:11:29 +03:00
) : null}
{props.showTheThing ? null : (
2017-07-05 09:45:06 +03:00
<BaseForm
url="/auth/google"
method="GET"
colour="blue"
size="large"
submitLabel="Sign in with Google"
>
Hello world
</BaseForm>
)}
2017-07-09 04:11:29 +03:00
{props.showTheOtherThing ? <div>I am here</div> : <div attr="blah" />}
{props.showTheOtherThing ? <div>I am here!!</div> : null}
2017-07-05 09:45:06 +03:00
</BaseForm>
);
2017-04-12 23:41:51 +03:00
2018-11-25 11:21:14 +03:00
================================================================================
2017-01-25 01:35:37 +03:00
`;