diff --git a/test/parser/whitespace-leading-trailing/input.html b/test/parser/whitespace-leading-trailing/input.html new file mode 100644 index 0000000000..569aa2db4b --- /dev/null +++ b/test/parser/whitespace-leading-trailing/input.html @@ -0,0 +1,3 @@ + + +

just chillin' over here

diff --git a/test/parser/whitespace-leading-trailing/output.json b/test/parser/whitespace-leading-trailing/output.json new file mode 100644 index 0000000000..796829a365 --- /dev/null +++ b/test/parser/whitespace-leading-trailing/output.json @@ -0,0 +1,26 @@ +{ + "html": { + "start": 6, + "end": 36, + "type": "Fragment", + "children": [ + { + "start": 6, + "end": 36, + "type": "Element", + "name": "p", + "attributes": [], + "children": [ + { + "start": 9, + "end": 32, + "type": "Text", + "data": "just chillin' over here" + } + ] + } + ] + }, + "css": null, + "js": null +} diff --git a/test/test.js b/test/test.js index d3cfa957b8..efd690d92f 100644 --- a/test/test.js +++ b/test/test.js @@ -31,7 +31,7 @@ describe( 'svelte', () => { const solo = exists( `test/parser/${dir}/solo` ); ( solo ? it.only : it )( dir, () => { - const input = fs.readFileSync( `test/parser/${dir}/input.html`, 'utf-8' ).trim(); + const input = fs.readFileSync( `test/parser/${dir}/input.html`, 'utf-8' ); try { const actual = parse( input );