[add] tests, [add] refactor epub feat

This commit is contained in:
2023-10-23 20:18:16 -04:00
parent bf6ac96376
commit b5d5e4bd64
17 changed files with 429 additions and 353 deletions

14
metadata/metadata_test.go Normal file
View File

@@ -0,0 +1,14 @@
package metadata
import (
"testing"
)
func TestGetWordCount(t *testing.T) {
var want int64 = 30477
wordCount, err := countEPUBWords("./_test_files/alice.epub")
if wordCount != want {
t.Fatalf(`Expected: %v, Got: %v, Error: %v`, want, wordCount, err)
}
}