From 63fe2643df4a8309f4350c67f0c899cfbe813355 Mon Sep 17 00:00:00 2001 From: Duc Le Date: Wed, 20 Nov 2024 20:24:02 +0000 Subject: [PATCH] Changed toPrecision test to use toFixed Despite the bad name, this is to agree with the Java ibex_gui code which uses fixed precision (N decimal places, rather than N significant figures). --- app/components/InstrumentPage.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/InstrumentPage.test.ts b/app/components/InstrumentPage.test.ts index 90c200d..e7630ee 100644 --- a/app/components/InstrumentPage.test.ts +++ b/app/components/InstrumentPage.test.ts @@ -49,7 +49,7 @@ test("toPrecision truncates block if it has precision", () => { precision: precision, }; expect(toPrecision(aBlock, originalValue)).toBe( - originalValue.toPrecision(precision), + originalValue.toFixed(precision), ); });