package runner import "testing" func TestNormalizedBillingEngineMode(t *testing.T) { t.Parallel() if got := normalizedBillingEngineMode(""); got != "observe" { t.Fatalf("empty mode = %q", got) } if got := normalizedBillingEngineMode("ENFORCE"); got != "enforce" { t.Fatalf("enforce mode = %q", got) } if got := normalizedBillingEngineMode("hold"); got != "hold" { t.Fatalf("hold mode = %q", got) } } func TestBillingItemsFixedTotalKeepsNineDecimalPlaces(t *testing.T) { t.Parallel() items := []any{ map[string]any{"amount": "0.000000001"}, map[string]any{"amount": float64(0.000000002)}, } if got := billingItemsFixedTotal(items).String(); got != "0.000000003" { t.Fatalf("total = %s", got) } }