use requireNoErr

This commit is contained in:
Kirill Zhuravlev 2023-02-15 01:26:37 +01:00 committed by Avelino
parent f2fb99dcca
commit 4dd74a2b02
No known key found for this signature in database
GPG Key ID: B345B4D52E98180A
1 changed files with 3 additions and 6 deletions

View File

@ -87,9 +87,8 @@ func TestDuplicatedLinks(t *testing.T) {
func TestSeparator(t *testing.T) {
var matched, containsLink, noDescription bool
input, err := os.ReadFile(readmePath)
if err != nil {
panic(err)
}
requireNoErr(t, err, "readme should be exists")
lines := strings.Split(string(input), "\n")
for _, line := range lines {
line = strings.Trim(line, " ")
@ -109,9 +108,7 @@ func TestSeparator(t *testing.T) {
func TestRenderIndex(t *testing.T) {
err := renderIndex(readmePath, outIndexFile)
if err != nil {
t.Errorf("html generate error '%s'", err.Error())
}
requireNoErr(t, err, "html should be rendered")
}
func testList(t *testing.T, list *goquery.Selection) {