Files
digital-psychology/apps/api/internal/star/synastry/synastry_test.go
T
jackyu66gitandCursor bd22d9dddd feat: P1 合盘/星座/问答与测测完整设计包及模拟器取证工具
落地 synastry/star/ask API 与 H5 页面,补齐 cece-frontend-re complete-design 证据文档,并加入 Android 模拟器截图抓取脚本。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 11:37:53 +08:00

27 lines
584 B
Go

package synastry
import (
"testing"
"time"
"github.com/yuxingu/digital-psychology/apps/api/internal/star/natal"
)
func TestComputeIndices(t *testing.T) {
a, err := natal.Compute(time.Date(1990, 5, 12, 0, 0, 0, 0, time.UTC), nil, nil)
if err != nil {
t.Fatal(err)
}
b, err := natal.Compute(time.Date(1992, 8, 1, 0, 0, 0, 0, time.UTC), nil, nil)
if err != nil {
t.Fatal(err)
}
idx := Compute(a, b, "我", "TA")
if idx.Love < 40 || idx.Friend < 40 || idx.Marriage < 40 {
t.Fatalf("scores too low: %+v", idx)
}
if idx.Summary == "" {
t.Fatal("empty summary")
}
}