Skip to content

Commit

Permalink
Changed toPrecision test to use toFixed
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
mducle committed Nov 20, 2024
1 parent 09ce0f0 commit 63fe264
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/InstrumentPage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
});

Expand Down

0 comments on commit 63fe264

Please sign in to comment.