落地 synastry/star/ask API 与 H5 页面,补齐 cece-frontend-re complete-design 证据文档,并加入 Android 模拟器截图抓取脚本。 Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
443 B
Go
22 lines
443 B
Go
package rhythm
|
|
|
|
import (
|
|
"encoding/json"
|
|
"strings"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestBuild(t *testing.T) {
|
|
out := Build(time.Date(1992, 6, 8, 0, 0, 0, 0, time.UTC), "我")
|
|
if out.Summary["primary_element"] == nil {
|
|
t.Fatal("missing element")
|
|
}
|
|
raw, _ := json.Marshal(out)
|
|
for _, bad := range []string{"运势", "吉凶", "算命", "疗效", "治病"} {
|
|
if strings.Contains(string(raw), bad) {
|
|
t.Fatalf("forbidden %q", bad)
|
|
}
|
|
}
|
|
}
|