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.
13 lines
307 B
Go
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")
|
|
}
|
|
}
|