23 lines
489 B
Go
23 lines
489 B
Go
package sv_SE_test
|
|
|
|
import (
|
|
"io/fs"
|
|
"testing"
|
|
|
|
"github.com/larvit/fejkdata"
|
|
"github.com/larvit/fejkdata/data/sv_SE"
|
|
)
|
|
|
|
func TestFSLoadsByItsManifest(t *testing.T) {
|
|
if _, err := fs.Stat(sv_SE.FS, ".fejkdata.json"); err != nil {
|
|
t.Fatalf("FS holds no manifest: %v", err)
|
|
}
|
|
f, err := fejkdata.New(fejkdata.WithDataFS(sv_SE.FS))
|
|
if err != nil {
|
|
t.Fatalf("New(WithDataFS(FS)) = %v", err)
|
|
}
|
|
if len(f.List()) == 0 {
|
|
t.Error("List() is empty, want the module's categories")
|
|
}
|
|
}
|