Test that each shipped package's Modules holds what its categories read and renders them, and that a mounted tree is a valid fs.FS
This commit is contained in:
@@ -12,9 +12,9 @@ func TestFSLoadsByItsManifest(t *testing.T) {
|
||||
if _, err := fs.Stat(geose.FS, ".fejkdata.json"); err != nil {
|
||||
t.Fatalf("FS holds no manifest: %v", err)
|
||||
}
|
||||
f, err := fejkdata.New(fejkdata.WithDataFS(geose.FS))
|
||||
f, err := fejkdata.New(fejkdata.WithDataFS(geose.Modules()...))
|
||||
if err != nil {
|
||||
t.Fatalf("New(WithDataFS(FS)) = %v", err)
|
||||
t.Fatalf("New(WithDataFS(Modules()...)) = %v", err)
|
||||
}
|
||||
if len(f.List()) == 0 {
|
||||
t.Error("List() is empty, want the module's categories")
|
||||
|
||||
@@ -12,9 +12,9 @@ func TestFSLoadsByItsManifest(t *testing.T) {
|
||||
if _, err := fs.Stat(geous.FS, ".fejkdata.json"); err != nil {
|
||||
t.Fatalf("FS holds no manifest: %v", err)
|
||||
}
|
||||
f, err := fejkdata.New(fejkdata.WithDataFS(geous.FS))
|
||||
f, err := fejkdata.New(fejkdata.WithDataFS(geous.Modules()...))
|
||||
if err != nil {
|
||||
t.Fatalf("New(WithDataFS(FS)) = %v", err)
|
||||
t.Fatalf("New(WithDataFS(Modules()...)) = %v", err)
|
||||
}
|
||||
if len(f.List()) == 0 {
|
||||
t.Error("List() is empty, want the module's categories")
|
||||
|
||||
Reference in New Issue
Block a user