assert/assert.go (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | package assert
import (
"testing"
g "github.com/maragudk/gomponents"
)
// Equal checks for equality between the given expected string and the rendered Node string.
func Equal(t *testing.T, expected string, actual g.Node) {
if expected != actual.Render() {
t.Errorf("expected `%v` but got `%v`", expected, actual)
t.FailNow()
}
}
|