diff options
Diffstat (limited to 'integration/snippets/jsx-spacing.jsx')
-rw-r--r-- | integration/snippets/jsx-spacing.jsx | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/integration/snippets/jsx-spacing.jsx b/integration/snippets/jsx-spacing.jsx new file mode 100644 index 000000000..73e31ebaa --- /dev/null +++ b/integration/snippets/jsx-spacing.jsx @@ -0,0 +1,36 @@ +import * as ReactDOM from "react-dom/server"; + +const Tester = ({ description }) => { + console.assert( + description === + "foo\nbar \n\nbaz\n\nthis\ntest\n\nchecks\nnewlines\nare\ngood\nyeah\n\n", + "Expected description to be 'foo\\nbar \\n\\nbaz\\n\\nthis\\ntest\\n\\nchecks\\nnewlines\\nare\\ngood\\nyeah\\n\\n' but was '" + + description + + "'" + ); + + return description; +}; + +export function test() { + const foo = ReactDOM.renderToString( + <Tester + description="foo + bar + + baz + + this + test + + checks + newlines + are + good + yeah + + " + ></Tester> + ); + testDone(import.meta.url); +} |