Skip to content

Commit cef211b

Browse files
authored
Add regression test for #776 (#901)
1 parent 06c1033 commit cef211b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/transform/transform_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,15 @@ func TestFullTransform(t *testing.T) {
252252
want: `<Component><h1>Hello world</h1></Component>`,
253253
},
254254
{
255-
name: "Component before html",
255+
name: "Component before html I",
256256
source: `<Navigation /><html><body><h1>Astro</h1></body></html>`,
257257
want: `<Navigation></Navigation><h1>Astro</h1>`,
258258
},
259+
{
260+
name: "Component before html II",
261+
source: `<MainHead title={title} description={description} /><html lang="en"><body><slot /></body></html>`,
262+
want: `<MainHead title={title} description={description}></MainHead><slot></slot>`,
263+
},
259264
{
260265
name: "respects explicitly authored elements",
261266
source: `<html><Component /></html>`,

0 commit comments

Comments
 (0)