sonda/internal/webui/webui_test.go
tgiachi 249b2cb7bc feat: embed the built web app in sondad behind the webui build tag
internal/webui carries web/'s build (written to internal/webui/dist by Vite, git-ignored) when sondad is built with -tags webui. Without the tag the app is absent and a plain go build and go test still work with no Node. main wires it into the router.
2026-11-12 15:56:34 +01:00

13 lines
307 B
Go

//go:build !webui
package webui
import "testing"
// A build without the webui tag has no app, and says so with a nil FS, not with an empty one that
// looks like an app.
func TestWithoutTheTagThereIsNoApp(t *testing.T) {
if FS() != nil {
t.Error("FS is not nil in a build without the webui tag")
}
}