v0.11.0 harden persistence and prepare game replays
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package webserver
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestEmbeddedWebClientRoot(t *testing.T) {
|
||||
content, err := fs.Sub(webFS, "chess-client-web")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, name := range []string{"index.html", "app.js", "style.css"} {
|
||||
data, err := fs.ReadFile(content, name)
|
||||
if err != nil {
|
||||
t.Errorf("read embedded %s: %v", name, err)
|
||||
}
|
||||
if len(data) == 0 {
|
||||
t.Errorf("embedded %s is empty", name)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user