prettier/tests/jsx/__snapshots__/jsfmt.spec.js.snap

227 lines
4.4 KiB
Plaintext
Raw Normal View History

exports[`test expression.js 1`] = `
"<View
style={
{
someVeryLongStyle1: \"true\",
someVeryLongStyle2: \"true\",
someVeryLongStyle3: \"true\",
someVeryLongStyle4: \"true\"
}
}
/>;
<View
style={
[
{
someVeryLongStyle1: \"true\",
someVeryLongStyle2: \"true\",
someVeryLongStyle3: \"true\",
someVeryLongStyle4: \"true\"
}
]
}
/>;
<Something>
{() => (
<SomethingElse>
<span />
</SomethingElse>
)}
</Something>;
<Something>
{items.map(item => (
<SomethingElse>
<span />
</SomethingElse>
))}
</Something>;
<Something>
{function() {
return (
<SomethingElse>
<span />
</SomethingElse>
);
}}
</Something>;
<RadioListItem
key={option}
imageSource={this.props.veryBigItemImageSourceFunc &&
this.props.veryBigItemImageSourceFunc(option)}
imageSize={this.props.veryBigItemImageSize}
imageView={this.props.veryBigItemImageViewFunc &&
this.props.veryBigItemImageViewFunc(option)}
heading={this.props.displayTextFunc(option)}
value={option}
/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<View
style={{
someVeryLongStyle1: \"true\",
someVeryLongStyle2: \"true\",
someVeryLongStyle3: \"true\",
someVeryLongStyle4: \"true\"
}}
/>;
<View
style={[
{
someVeryLongStyle1: \"true\",
someVeryLongStyle2: \"true\",
someVeryLongStyle3: \"true\",
someVeryLongStyle4: \"true\"
}
]}
/>;
<Something>
{() => (
<SomethingElse>
<span />
</SomethingElse>
)}
</Something>;
<Something>
{items.map(item => (
<SomethingElse>
<span />
</SomethingElse>
))}
</Something>;
<Something>
{function() {
return (
<SomethingElse>
<span />
</SomethingElse>
);
}}
</Something>;
<RadioListItem
key={option}
imageSource={
this.props.veryBigItemImageSourceFunc &&
this.props.veryBigItemImageSourceFunc(option)
}
imageSize={this.props.veryBigItemImageSize}
imageView={
this.props.veryBigItemImageViewFunc &&
this.props.veryBigItemImageViewFunc(option)
}
heading={this.props.displayTextFunc(option)}
value={option}
/>;
"
`;
exports[`test hug.js 1`] = `
"<div>
{__DEV__
? this.renderDevApp()
: <div>
{routes.map(route => (
<MatchAsync
key={\`\${route.to}-async\`}
pattern={route.to}
exactly={route.to === \"/\"}
getComponent={routeES6Modules[route.value]}
/>
))}
</div>}
</div>;
<div>
{__DEV__ && <div>
{routes.map(route => (
<MatchAsync
key={\`\${route.to}-async\`}
pattern={route.to}
exactly={route.to === \"/\"}
getComponent={routeES6Modules[route.value]}
/>
))}
</div>}
</div>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<div>
{__DEV__
? this.renderDevApp()
: <div>
2017-01-26 22:58:40 +03:00
{routes.map(route => (
<MatchAsync
key={\`\${route.to}-async\`}
pattern={route.to}
exactly={route.to === \"/\"}
getComponent={routeES6Modules[route.value]}
/>
))}
</div>}
</div>;
<div>
{__DEV__ &&
<div>
{routes.map(route => (
<MatchAsync
key={\`\${route.to}-async\`}
pattern={route.to}
exactly={route.to === \"/\"}
getComponent={routeES6Modules[route.value]}
/>
))}
</div>}
</div>;
"
`;
exports[`test quotes.js 1`] = `
"<div id=\"&quot;\'<>&amp;quot;\" />;
<div id=\'\"&#39;<>&amp;quot;\' />;
<div id={\'\\\'\"&quot;<>&amp;quot;\'} />;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<div id=\"&quot;\'<>&amp;quot;\" />;
<div id=\"&quot;\'<>&amp;quot;\" />;
<div id={\"\'\\\"&quot;<>&amp;quot;\"} />;
"
`;
exports[`test object-property.js 1`] = `
"const tabs = [
{
title: \"General Info\",
content: (
<GeneralForm
long-attribute=\"i-need-long-value-here\"
onSave={ onSave }
onCancel={ onCancel }
countries={ countries }
/>
)
}
];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const tabs = [
{
title: \"General Info\",
content: (
<GeneralForm
long-attribute=\"i-need-long-value-here\"
onSave={onSave}
onCancel={onCancel}
countries={countries}
/>
)
}
];
"
`;