using testify instead of testing.T methods. (#143)

This commit is contained in:
K
2024-09-09 13:50:56 +03:30
committed by GitHub
parent b2692a2584
commit c91e7b9765
21 changed files with 473 additions and 643 deletions

View File

@@ -2,6 +2,8 @@ package nostr
import (
"testing"
"github.com/stretchr/testify/assert"
)
type urlTest struct {
@@ -29,8 +31,7 @@ var urlTests = []urlTest{
func TestNormalizeURL(t *testing.T) {
for _, test := range urlTests {
if output := NormalizeURL(test.url); output != test.expected {
t.Errorf("Output '%s' not equal to expected '%s'", output, test.expected)
}
output := NormalizeURL(test.url)
assert.Equal(t, test.expected, output)
}
}