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
+7
View File
@@ -161,3 +161,10 @@ func TestDirReadsTheDirectoryAndLabelsItsErrorsWithIt(t *testing.T) {
t.Errorf("Walk = %v, want a file refused as no directory", err)
}
}
func TestAMountedTreeIsAValidFS(t *testing.T) {
m := mounted{fsys: fstest.MapFS{"a.json": {Data: []byte(`"x"`)}, "sub/b.json": {Data: []byte(`"y"`)}}, at: "my/data"}
if err := fstest.TestFS(m, "my/data/a.json", "my/data/sub/b.json"); err != nil {
t.Fatal(err)
}
}