Skip to content

Commit

Permalink
Add regression test for #776 (#901)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoustaphaDev authored Dec 20, 2023
1 parent 06c1033 commit cef211b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/transform/transform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,15 @@ func TestFullTransform(t *testing.T) {
want: `<Component><h1>Hello world</h1></Component>`,
},
{
name: "Component before html",
name: "Component before html I",
source: `<Navigation /><html><body><h1>Astro</h1></body></html>`,
want: `<Navigation></Navigation><h1>Astro</h1>`,
},
{
name: "Component before html II",
source: `<MainHead title={title} description={description} /><html lang="en"><body><slot /></body></html>`,
want: `<MainHead title={title} description={description}></MainHead><slot></slot>`,
},
{
name: "respects explicitly authored elements",
source: `<html><Component /></html>`,
Expand Down

0 comments on commit cef211b

Please sign in to comment.