-- file.tsx --
~~ lineWidth: 50 ~~
== should format ==
const t = <   Test  >Test</Test>;

[expect]
const t = <Test>Test</Test>;

== should format when has attributes ==
const t = <Test    attrib={5}    other="test"  > < /  Test  > ;

[expect]
const t = <Test attrib={5} other="test"></Test>;

== should make the body multi-line when the header is multiple lines ==
const t = <Test attrib={5} otherAttrib="test" anotherVeryLongAttrib={234234}>Test</Test>;

[expect]
const t = (
    <Test
        attrib={5}
        otherAttrib="test"
        anotherVeryLongAttrib={234234}
    >
        Test
    </Test>
);

== should make the body multi-line when the header is multiple lines and inside parens ==
const t = (
    <Test attrib={5} otherVeryLongAttrib="test" anotherVeryLongAttrib={234234}>Test</Test>
);

[expect]
const t = (
    <Test
        attrib={5}
        otherVeryLongAttrib="test"
        anotherVeryLongAttrib={234234}
    >
        Test
    </Test>
);

== should make the attribs multi-line when first is on a different line ==
const t = <Test
attrib={5} other={6}><Test /><Test /></Test>;

[expect]
const t = (
    <Test
        attrib={5}
        other={6}
    >
        <Test />
        <Test />
    </Test>
);

== should support a comment on the next line after the name ==
function Test() {
    return <View
        // comment
    ></View>;
}

[expect]
function Test() {
    return (
        <View
            // comment
        >
        </View>
    );
}

== should support a comment on the same line as the name ==
function Test() {
    return <View // comment
    ></View>;
}

[expect]
function Test() {
    return (
        <View // comment
        >
        </View>
    );
}

== should support comments surrounding attributes ==
function Test() {
    return <View
        // comment
        test={5} // test
        // other
    ></View>;
}

[expect]
function Test() {
    return (
        <View
            // comment
            test={5} // test
            // other
        >
        </View>
    );
}

== should support a block comment after the name ==
function Test() {
    return <View /* test */
    />;
}

[expect]
function Test() {
    return <View /* test */ />;
}

== should support a comment on the next line after the name when self closing ==
function Test() {
    return <View
        // comment
    />;
}

[expect]
function Test() {
    return (
        <View
            // comment
        />
    );
}

== should support a comment on the same line as the name when self closing ==
function Test() {
    return <View // comment
    />;
}

[expect]
function Test() {
    return (
        <View // comment
        />
    );
}
