Skip to content

Commit

Permalink
test: add test for #712
Browse files Browse the repository at this point in the history
  • Loading branch information
MoustaphaDev committed Mar 1, 2024
1 parent 045f4c0 commit 1d077f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/printer/printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3744,6 +3744,11 @@ const c = '\''
source: `<html><body><h1>Hello world!</h1></body></html><style></style>`,
want: []ASTNode{{Type: "element", Name: "html", Children: []ASTNode{{Type: "element", Name: "body", Children: []ASTNode{{Type: "element", Name: "h1", Children: []ASTNode{{Type: "text", Value: "Hello world!"}}}}}}}, {Type: "element", Name: "style"}},
},
{
name: "style after html with component in head",
source: `<html lang="en"><head><BaseHead /></head></html><style>@use "../styles/global.scss";</style>`,
want: []ASTNode{{Type: "element", Name: "html", Attributes: []ASTNode{{Type: "attribute", Kind: "quoted", Name: "lang", Value: "en", Raw: "\"en\""}}, Children: []ASTNode{{Type: "element", Name: "head", Children: []ASTNode{{Type: "component", Name: "BaseHead"}}}}}, {Type: "element", Name: "style", Children: []ASTNode{{Type: "text", Value: "@use \"../styles/global.scss\";"}}}},
},
{
name: "style in html",
source: `<html><body><h1>Hello world!</h1></body><style></style></html>`,
Expand Down

0 comments on commit 1d077f8

Please sign in to comment.