Improved testing
This commit is contained in:
parent
b45af0eaf9
commit
1101dafc90
@ -14,7 +14,7 @@ func BenchmarkDBAnimeListGetMap(b *testing.B) {
|
|||||||
|
|
||||||
b.RunParallel(func(pb *testing.PB) {
|
b.RunParallel(func(pb *testing.PB) {
|
||||||
for pb.Next() {
|
for pb.Next() {
|
||||||
animeList, _ := arn.GetAnimeList(user)
|
animeList, _ := arn.GetAnimeList(user.ID)
|
||||||
noop(animeList)
|
noop(animeList)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -24,6 +24,8 @@ func TestRoutes(t *testing.T) {
|
|||||||
|
|
||||||
if status := responseRecorder.Code; status != http.StatusOK {
|
if status := responseRecorder.Code; status != http.StatusOK {
|
||||||
t.Errorf("%s | Wrong status code | %v instead of %v", example, status, http.StatusOK)
|
t.Errorf("%s | Wrong status code | %v instead of %v", example, status, http.StatusOK)
|
||||||
|
} else {
|
||||||
|
t.Logf("%s | Correct status code | %v == %v", example, status, http.StatusOK)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
makefile
2
makefile
@ -23,7 +23,7 @@ js:
|
|||||||
install:
|
install:
|
||||||
$(GOINSTALL)
|
$(GOINSTALL)
|
||||||
test:
|
test:
|
||||||
$(GOTEST)
|
$(GOTEST) github.com/animenotifier/... -v
|
||||||
bench:
|
bench:
|
||||||
$(GOTEST) -bench .
|
$(GOTEST) -bench .
|
||||||
tools:
|
tools:
|
||||||
|
@ -210,8 +210,10 @@ component Anime(anime *arn.Anime, friends []*arn.User, listItems map[*arn.User]*
|
|||||||
RawIcon("eye")
|
RawIcon("eye")
|
||||||
//- a(href="https://translate.google.com/#ja/en/" + episode.Title.Japanese, target="_blank", rel="noopener")
|
//- a(href="https://translate.google.com/#ja/en/" + episode.Title.Japanese, target="_blank", rel="noopener")
|
||||||
//- RawIcon("google")
|
//- RawIcon("google")
|
||||||
|
if episode.AiringDate.IsValid()
|
||||||
td.episode-airing-date-start.utc-airing-date(data-start-date=episode.AiringDate.Start, data-end-date=episode.AiringDate.End, data-episode-number=episode.Number)= episode.AiringDate.StartDateHuman()
|
td.episode-airing-date-start.utc-airing-date(data-start-date=episode.AiringDate.Start, data-end-date=episode.AiringDate.End, data-episode-number=episode.Number)= episode.AiringDate.StartDateHuman()
|
||||||
|
else
|
||||||
|
td.episode-airing-date-start
|
||||||
//- h3.anime-section-name Reviews
|
//- h3.anime-section-name Reviews
|
||||||
//- p Coming soon.
|
//- p Coming soon.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user