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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user