Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix attr panic test #222

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions gomponents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,12 @@ func TestAttr(t *testing.T) {
})

t.Run("panics with more than two arguments", func(t *testing.T) {
called := false
defer func() {
if err := recover(); err != nil {
called = true
if rec := recover(); rec == nil {
t.FailNow()
}
}()
g.Attr("name", "value", "what is this?")
if !called {
t.FailNow()
}
})

t.Run("implements fmt.Stringer", func(t *testing.T) {
Expand Down
Loading