1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 23:07:35 +00:00

LibJS: Use more accurate number-to-string method in Number toPrecision

This commit is contained in:
Timothy Flynn 2022-11-04 11:16:58 -04:00 committed by Linus Groh
parent d56205f991
commit 5898db8c0f
2 changed files with 4 additions and 5 deletions

View file

@ -87,6 +87,9 @@ describe("correct behavior", () => {
[1, 4, "1.000"],
[123, 4, "123.0"],
[123.45, 4, "123.5"],
// Disabled for now due to: https://github.com/SerenityOS/serenity/issues/15924
// [3, 100, "3." + "0".repeat(99)],
].forEach(test => {
expect(test[0].toPrecision(test[1])).toBe(test[2]);
});