[add] tests, [add] refactor epub feat
This commit is contained in:
14
metadata/metadata_test.go
Normal file
14
metadata/metadata_test.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user