From 1594507c3753432b22731a0fc05ac1ed1606f455 Mon Sep 17 00:00:00 2001 From: Bradley Ayers Date: Sat, 26 Oct 2024 16:22:44 +1100 Subject: [PATCH] Test cases for multiline string expressions --- test.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test.js b/test.js index 67ebb71..e4aea95 100644 --- a/test.js +++ b/test.js @@ -2622,6 +2622,26 @@ test('roundtrip', async function (t) { equal(source, source) } ) + + await t.test( + 'should roundtrip `JSX attributes containing new lines`', + async function () { + equal( + `\n`, + `\n` + ) + } + ) + + await t.test( + 'should roundtrip `JSX multiline string children`', + async function () { + equal( + `{\`\n0\n 1\n 2\n 3\n 4\n 5\`}}\n/>\n`, + `{\`\n0\n 1\n 2\n 3\n 4\n 5\`}}\n/>\n` + ) + } + ) }) /**