init
This commit is contained in:
27
frontend_github_link_test.go
Normal file
27
frontend_github_link_test.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestFrontendHasRepositoryLinkButton(t *testing.T) {
|
||||
source, err := os.ReadFile("frontend/src/App.tsx")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
app := string(source)
|
||||
|
||||
expectations := []string{
|
||||
"BrowserOpenURL",
|
||||
"Github",
|
||||
"打开项目仓库",
|
||||
"http://10.1.0.1:3000/sgg-sgg-tools/sgg-sgg-ai-skill-manage-windows",
|
||||
}
|
||||
for _, expected := range expectations {
|
||||
if !strings.Contains(app, expected) {
|
||||
t.Fatalf("App.tsx is missing %q", expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user