From 38ab1ecdd195446f1b7480d9251da3670c8c7fad Mon Sep 17 00:00:00 2001 From: Alfred Kamanda Date: Wed, 29 Oct 2025 10:53:11 +0300 Subject: [PATCH] added an edge-case test for precision --- store/tokens_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/store/tokens_test.go b/store/tokens_test.go index 625a65d..34cca1e 100644 --- a/store/tokens_test.go +++ b/store/tokens_test.go @@ -22,6 +22,13 @@ func TestTruncateDecimalString(t *testing.T) { want: "4.00", expectError: false, }, + { + name: "precision test", + input: "2.1", + decimalPlaces: 2, + want: "2.10", + expectError: false, + }, { name: "single decimal", input: "4.1",