-- file.tsx -- ~~ lineWidth: 40 ~~ == should not remove spaces between == const t =
{t} {u} {v}
; [expect] const t =
{t} {u} {v}
; == should remove spaces surrounding == const t =
test
; [expect] const t =
test
; == should handle a space when exceeding the line width with only the parent when the parent and children are on the same line == const t =
{test} {testsdffffffffffff}
; [expect] const t = (
{test} {testsdffffffffffff}
); == should handle a space when exceeding the line width within the children == const t = (
{testtestingting} {testsdffffffffffff}
); [expect] const t = (
{testtestingting}{" "} {testsdffffffffffff}
); == should add a jsx space expression when going to two lines with a space in between == function test() { return
{testasdfasdfas} {othertestsettest}
} [expect] function test() { return (
{testasdfasdfas}{" "} {othertestsettest}
); } == should add jsx space expr between expr and text when going to two lines == function test() { return
{testingthisout} Testingthisouttt
; } [expect] function test() { return (
{testingthisout}{" "} Testingthisouttt
); } == should add jsx space expr between text and expr when going to two lines == function test() { return
Testingthisouttt {testingthisout}
; } [expect] function test() { return (
Testingthisouttt{" "} {testingthisout}
); } == should move jsx space expr to same line == function test() { return
{testasdfasdfas} {" "} {othertestsettest}
; } [expect] function test() { return (
{testasdfasdfas}{" "} {othertestsettest}
); } == should collapse a blank line when there's a space expr == function test() { return
{testasdfasdfas} {" "} {othertestsettest} {" "} {test}
; } [expect] function test() { return (
{testasdfasdfas}{" "} {othertestsettest} {test}
); } == should collapse and remove the jsx space expr when it's not necessary == function test() { return
{test} {" "} {test}
; } [expect] function test() { return (
{test} {test}
); } == should combine multiple jsx space exprs together == function test() { return
{test} {" "} {" "} {" "} {" "} {test}
; } [expect] function test() { return (
{test}{" "}{test}
); } == should move a space from before a jsx space expr into the expression == function test() { const t1 = {t} {" "} {u}; const t2 = {t} {" "} {" "} {u}; } [expect] function test() { const t1 = {t}{" "}{u}; const t2 = {t}{" "}{u}; } == should combine spaces when surrounded by text == function test() { const t1 =
A {" "} B
; const t2 =
A{" "} B
; const t3 =
A{" "}B
; } [expect] function test() { const t1 =
A{" "}B
; const t2 =
A{" "}B
; const t3 =
A B
; } == should handle the added space exceeding the line width == const t1 = (
{" "}
); const t2 = (
{" "}
); [expect] const t1 = (
{" "}
); const t2 = (
{" "}
); == should keep a space expr that's alone == const t1 = (
{" "}
); [expect] const t1 = (
{" "}
); == should keep a space expr that's at the start == const t1 = (
{" "} {other}
); [expect] const t1 = (
{" "} {other}
); == should keep a space expr that's at the end == const t1 =
{other} {" "}
; [expect] const t1 = (
{other} {" "}
); == should always use a space with newline after a multi-line jsx element == const t1 = (
This is a test.
); [expect] const t1 = (
{" "} This is a test.
); == should always use a space with newline after a multi-line jsx fragment == const t1 = (
<> This is a test.
); [expect] const t1 = (
<> {" "} This is a test.
); == should always use a space with a newline before a multi-line jsx element == const t1 = (
Testing this out.
); [expect] const t1 = (
Testing{" "} {" "} this out.
); == should always use a space with a newline before a multi-line jsx fragment == const t1 =
Testing <> this out.
; [expect] const t1 = (
Testing{" "} <> {" "} this out.
); == should handle scenario where jsx element is single line and inline between text == const t1 = (
Testing Test
); const t2 = (
Test Testing
); const t3 = (
Test Testing
); [expect] const t1 = (
Testing{" "} Test
); const t2 = (
Test {" "} Testing
); const t3 = (
Test {" "} Testing
);