Enable testifylint rules (#34075)
Some checks failed
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled

enable testifylint rules disabled in:
https://github.com/go-gitea/gitea/pull/34054
This commit is contained in:
TheFox0x7
2025-03-31 07:53:48 +02:00
committed by GitHub
parent 0fd5392087
commit 0fde8ecd55
262 changed files with 1315 additions and 1365 deletions

View File

@@ -46,7 +46,7 @@ owner/repo!123456789
contentBytes := []byte(test)
convertFullHTMLReferencesToShortRefs(re, &contentBytes)
result := string(contentBytes)
assert.EqualValues(t, expect, result)
assert.Equal(t, expect, result)
}
func TestFindAllIssueReferences(t *testing.T) {
@@ -283,9 +283,9 @@ func testFixtures(t *testing.T, fixtures []testFixture, context string) {
}
expref := rawToIssueReferenceList(expraw)
refs := FindAllIssueReferencesMarkdown(fixture.input)
assert.EqualValues(t, expref, refs, "[%s] Failed to parse: {%s}", context, fixture.input)
assert.Equal(t, expref, refs, "[%s] Failed to parse: {%s}", context, fixture.input)
rawrefs := findAllIssueReferencesMarkdown(fixture.input)
assert.EqualValues(t, expraw, rawrefs, "[%s] Failed to parse: {%s}", context, fixture.input)
assert.Equal(t, expraw, rawrefs, "[%s] Failed to parse: {%s}", context, fixture.input)
}
// Restore for other tests that may rely on the original value
@@ -294,7 +294,7 @@ func testFixtures(t *testing.T, fixtures []testFixture, context string) {
func TestFindAllMentions(t *testing.T) {
res := FindAllMentionsBytes([]byte("@tasha, @mike; @lucy: @john"))
assert.EqualValues(t, []RefSpan{
assert.Equal(t, []RefSpan{
{Start: 0, End: 6},
{Start: 8, End: 13},
{Start: 15, End: 20},
@@ -554,7 +554,7 @@ func TestParseCloseKeywords(t *testing.T) {
res := pat.FindAllStringSubmatch(test.match, -1)
assert.Len(t, res, 1)
assert.Len(t, res[0], 2)
assert.EqualValues(t, test.expected, res[0][1])
assert.Equal(t, test.expected, res[0][1])
}
}
}