Test that a manifest's namespace mounts its source under a dot path, that each shipped module loads from data/<lowered namespace>, and that a load failure's note reaches Fake, FakeTemplate and FakeStruct once
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
package SE_test
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"testing"
|
||||
|
||||
"github.com/larvit/fejkdata"
|
||||
"github.com/larvit/fejkdata/data/geo/SE"
|
||||
)
|
||||
|
||||
func TestFSLoadsByItsManifest(t *testing.T) {
|
||||
if _, err := fs.Stat(SE.FS, ".fejkdata.json"); err != nil {
|
||||
t.Fatalf("FS holds no manifest: %v", err)
|
||||
}
|
||||
f, err := fejkdata.New(fejkdata.WithDataFS(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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user