ci: fix tests

This commit is contained in:
q
2025-07-09 09:31:17 +02:00
parent 310068858f
commit 7b4197d81e
3 changed files with 93 additions and 311 deletions

View File

@@ -115,12 +115,13 @@ func TestContentImagesOnly(t *testing.T) {
func TestSubChapters(t *testing.T) {
config0 := NewScrapeConfigQuiet()
config0.Selector = ".concrete>article>h2>a"
config1 := NewScrapeConfigQuiet()
c := NewChapterFromURL("https://12factor.net/", "", []*ScrapeConfig{config0, config1}, 0, func(index int, name string) {})
got := len(c.SubChapters())
want := 21
want := 12
if got != want {
t.Errorf("got %v, wanted %v", got, want)