package server_test import ( "net/http" "regexp" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "sneak.berlin/go/webhooker/templates" ) // TestBaseTemplateScriptsAreServed walks every /s/ script the base // template loads on each page and fetches it through the real router. // Alpine.js is fetched at build time rather than committed, so nothing // in the repo guarantees it is present: this is the check that the page // still gets the JavaScript it asks for. func TestBaseTemplateScriptsAreServed(t *testing.T) { t.Parallel() // scriptSrc matches the src of every