mirror of
https://github.com/avelino/awesome-go.git
synced 2024-11-13 11:14:37 -05:00
use requireNoErr
This commit is contained in:
parent
f2fb99dcca
commit
4dd74a2b02
1 changed files with 3 additions and 6 deletions
|
@ -87,9 +87,8 @@ func TestDuplicatedLinks(t *testing.T) {
|
||||||
func TestSeparator(t *testing.T) {
|
func TestSeparator(t *testing.T) {
|
||||||
var matched, containsLink, noDescription bool
|
var matched, containsLink, noDescription bool
|
||||||
input, err := os.ReadFile(readmePath)
|
input, err := os.ReadFile(readmePath)
|
||||||
if err != nil {
|
requireNoErr(t, err, "readme should be exists")
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
lines := strings.Split(string(input), "\n")
|
lines := strings.Split(string(input), "\n")
|
||||||
for _, line := range lines {
|
for _, line := range lines {
|
||||||
line = strings.Trim(line, " ")
|
line = strings.Trim(line, " ")
|
||||||
|
@ -109,9 +108,7 @@ func TestSeparator(t *testing.T) {
|
||||||
|
|
||||||
func TestRenderIndex(t *testing.T) {
|
func TestRenderIndex(t *testing.T) {
|
||||||
err := renderIndex(readmePath, outIndexFile)
|
err := renderIndex(readmePath, outIndexFile)
|
||||||
if err != nil {
|
requireNoErr(t, err, "html should be rendered")
|
||||||
t.Errorf("html generate error '%s'", err.Error())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func testList(t *testing.T, list *goquery.Selection) {
|
func testList(t *testing.T, list *goquery.Selection) {
|
||||||
|
|
Loading…
Reference in a new issue