blob: b2b6002b6f27aeae0874d11d2951d67b1b734918 (
plain)
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()
}
}
|