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:
2026-10-11 15:05:56 +02:00
committed by Lillem4n
parent 203486a9d3
commit d4dee46086
8 changed files with 40 additions and 27 deletions
+2 -2
View File
@@ -12,9 +12,9 @@ func TestFSLoadsByItsManifest(t *testing.T) {
if _, err := fs.Stat(enus.FS, ".fejkdata.json"); err != nil {
t.Fatalf("FS holds no manifest: %v", err)
}
f, err := fejkdata.New(fejkdata.WithDataFS(enus.FS))
f, err := fejkdata.New(fejkdata.WithDataFS(enus.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")