Skip to content

Commit

Permalink
fix: css rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h committed Apr 17, 2023
1 parent 086703c commit 8cafe49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 2 additions & 0 deletions generator/htmldiff/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ func Diff(input templ.Component, expected string) (diff string, err error) {
if err != nil {
errs = append(errs, fmt.Errorf("failed to render component: %w", err))
}
w.Close()

// Wait for processing.
wg.Wait()

return cmp.Diff(expected, actual.String()), errors.Join(errs...)
Expand Down
6 changes: 0 additions & 6 deletions generator/test-css-usage/render_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
package testcssusage

import (
"context"
_ "embed"
"io"
"strings"
"testing"

"github.com/a-h/htmlformat"
"github.com/a-h/templ/generator/htmldiff"
"github.com/google/go-cmp/cmp"
)

//go:embed expected.html
Expand All @@ -23,7 +18,6 @@ func TestHTML(t *testing.T) {
t.Fatal(err)
}
if diff != "" {
if err != nil {
t.Error(diff)
}
}

0 comments on commit 8cafe49

Please sign in to comment.