Skip to content

Commit de59d52

Browse files
committed
Test case for multiline string attribute values
1 parent e0d1a16 commit de59d52

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

test.js

+28
Original file line numberDiff line numberDiff line change
@@ -2622,6 +2622,34 @@ test('roundtrip', async function (t) {
26222622
equal(source, source)
26232623
}
26242624
)
2625+
2626+
await t.test(
2627+
'should roundtrip `JSX attributes containing new lines`',
2628+
async function () {
2629+
equal(
2630+
`<a
2631+
text={\`
2632+
0
2633+
1
2634+
2
2635+
3
2636+
4
2637+
5\`}
2638+
/>
2639+
`,
2640+
`<a
2641+
text={\`
2642+
0
2643+
1
2644+
2
2645+
3
2646+
4
2647+
5\`}
2648+
/>
2649+
`
2650+
)
2651+
}
2652+
)
26252653
})
26262654

26272655
/**

0 commit comments

Comments
 (0)