From 1d077f8332c4ce3764522b3567b49c154c4c491d Mon Sep 17 00:00:00 2001 From: Moustapha HappyDev Date: Fri, 1 Mar 2024 22:53:24 +0000 Subject: [PATCH] test: add test for #712 --- internal/printer/printer_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/printer/printer_test.go b/internal/printer/printer_test.go index 2c02c2278..191268949 100644 --- a/internal/printer/printer_test.go +++ b/internal/printer/printer_test.go @@ -3744,6 +3744,11 @@ const c = '\'' source: `

Hello world!

`, 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: ``, + 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: `

Hello world!

`,