落地 synastry/star/ask API 与 H5 页面,补齐 cece-frontend-re complete-design 证据文档,并加入 Android 模拟器截图抓取脚本。 Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
584 B
Go
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")
|
|
}
|
|
}
|