From 94fa35e603fe756c42c3895ccf73af0b2e9ed2c3 Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:15:02 +0000 Subject: [PATCH 01/11] Initial empty commit to create PR From fb0014010e13eca421688b6715af6b42731e0316 Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:16:15 +0000 Subject: [PATCH 02/11] Update utils/format-percentage.test.ts [skip ci] --- utils/format-percentage.test.ts | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 utils/format-percentage.test.ts diff --git a/utils/format-percentage.test.ts b/utils/format-percentage.test.ts new file mode 100644 index 0000000..d1d0ea4 --- /dev/null +++ b/utils/format-percentage.test.ts @@ -0,0 +1,59 @@ +import { formatPercentage } from "./format-percentage"; + +describe("formatPercentage", () => { + describe("null values", () => { + it("should return '0%' for null", () => { + expect(formatPercentage(null)).toBe("0%"); + }); + }); + + describe("NaN values", () => { + it("should return '0%' for NaN", () => { + expect(formatPercentage(NaN)).toBe("0%"); + }); + }); + + describe("positive integers", () => { + it("should format positive integers correctly", () => { + expect(formatPercentage(0)).toBe("0%"); + expect(formatPercentage(1)).toBe("1%"); + expect(formatPercentage(50)).toBe("50%"); + expect(formatPercentage(100)).toBe("100%"); + expect(formatPercentage(999)).toBe("999%"); + }); + }); + + describe("positive decimals", () => { + it("should floor positive decimal values", () => { + expect(formatPercentage(0.1)).toBe("0%"); + expect(formatPercentage(0.9)).toBe("0%"); + expect(formatPercentage(1.1)).toBe("1%"); + expect(formatPercentage(1.9)).toBe("1%"); + expect(formatPercentage(50.5)).toBe("50%"); + expect(formatPercentage(99.99)).toBe("99%"); + }); + }); + + describe("negative numbers", () => { + it("should handle negative integers", () => { + expect(formatPercentage(-1)).toBe("-1%"); + expect(formatPercentage(-50)).toBe("-50%"); + expect(formatPercentage(-100)).toBe("-100%"); + }); + + it("should floor negative decimal values", () => { + expect(formatPercentage(-0.1)).toBe("-1%"); + expect(formatPercentage(-0.9)).toBe("-1%"); + expect(formatPercentage(-1.1)).toBe("-2%"); + expect(formatPercentage(-1.9)).toBe("-2%"); + expect(formatPercentage(-50.5)).toBe("-51%"); + }); + }); + + describe("edge cases", () => { + it("should handle very large numbers", () => { + expect(formatPercentage(1000000)).toBe("1000000%"); + expect(formatPercentage(999999.99)).toBe("999999%"); + }); + }); +}); From cc653cdf5bd80cddbdb4dd846d9726eaab0b426f Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:17:16 +0000 Subject: [PATCH 03/11] Replace content of utils/format-percentage.test.ts [skip ci] From f86cef2ae471ca69f7dd3fbb0eb87bc3befd2ce6 Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:18:50 +0000 Subject: [PATCH 04/11] Update utils/format-percentage.test.ts [skip ci] --- utils/format-percentage.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/format-percentage.test.ts b/utils/format-percentage.test.ts index d1d0ea4..eea6ca6 100644 --- a/utils/format-percentage.test.ts +++ b/utils/format-percentage.test.ts @@ -57,3 +57,8 @@ describe("formatPercentage", () => { }); }); }); + + describe("real world usage", () => { + it("should handle coverage percentage values", () => { + expect(formatPercentage(85.7)).toBe("85%"); + }); From 15724cb90a475b2fb7dda6233dd86658af007998 Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:19:04 +0000 Subject: [PATCH 05/11] Update utils/format-percentage.test.ts [skip ci] --- utils/format-percentage.test.ts | 57 +++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/utils/format-percentage.test.ts b/utils/format-percentage.test.ts index eea6ca6..d14ec2e 100644 --- a/utils/format-percentage.test.ts +++ b/utils/format-percentage.test.ts @@ -1,5 +1,62 @@ import { formatPercentage } from "./format-percentage"; + +describe("formatPercentage", () => { + describe("null values", () => { + it("should return '0%' for null", () => { + expect(formatPercentage(null)).toBe("0%"); + }); + }); + + describe("NaN values", () => { + it("should return '0%' for NaN", () => { + expect(formatPercentage(NaN)).toBe("0%"); + }); + }); + + describe("positive integers", () => { + it("should format positive integers correctly", () => { + expect(formatPercentage(0)).toBe("0%"); + expect(formatPercentage(1)).toBe("1%"); + expect(formatPercentage(50)).toBe("50%"); + expect(formatPercentage(100)).toBe("100%"); + expect(formatPercentage(999)).toBe("999%"); + }); + }); + + describe("positive decimals", () => { + it("should floor positive decimal values", () => { + expect(formatPercentage(0.1)).toBe("0%"); + expect(formatPercentage(0.9)).toBe("0%"); + expect(formatPercentage(1.1)).toBe("1%"); + expect(formatPercentage(1.9)).toBe("1%"); + expect(formatPercentage(50.5)).toBe("50%"); + expect(formatPercentage(99.99)).toBe("99%"); + }); + }); + + describe("negative numbers", () => { + it("should handle negative integers", () => { + expect(formatPercentage(-1)).toBe("-1%"); + expect(formatPercentage(-50)).toBe("-50%"); + expect(formatPercentage(-100)).toBe("-100%"); + }); + + it("should floor negative decimal values", () => { + expect(formatPercentage(-0.1)).toBe("-1%"); + expect(formatPercentage(-0.9)).toBe("-1%"); + expect(formatPercentage(-1.1)).toBe("-2%"); + expect(formatPercentage(-1.9)).toBe("-2%"); + expect(formatPercentage(-50.5)).toBe("-51%"); + }); + }); + + describe("edge cases", () => { + it("should handle very large numbers", () => { + expect(formatPercentage(1000000)).toBe("1000000%"); + expect(formatPercentage(999999.99)).toBe("999999%"); + }); + }); describe("formatPercentage", () => { describe("null values", () => { it("should return '0%' for null", () => { From 07ceaa4d17926128da6f3cc099bb175f906f68be Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:20:06 +0000 Subject: [PATCH 06/11] Update utils/format-percentage.test.ts [skip ci] --- utils/format-percentage.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/format-percentage.test.ts b/utils/format-percentage.test.ts index d14ec2e..af2ae4a 100644 --- a/utils/format-percentage.test.ts +++ b/utils/format-percentage.test.ts @@ -57,7 +57,6 @@ describe("formatPercentage", () => { expect(formatPercentage(999999.99)).toBe("999999%"); }); }); -describe("formatPercentage", () => { describe("null values", () => { it("should return '0%' for null", () => { expect(formatPercentage(null)).toBe("0%"); From 3a11cfbfa422ede9602d16e352a53284efdee164 Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:20:27 +0000 Subject: [PATCH 07/11] Update utils/format-percentage.test.ts [skip ci] --- utils/format-percentage.test.ts | 61 --------------------------------- 1 file changed, 61 deletions(-) diff --git a/utils/format-percentage.test.ts b/utils/format-percentage.test.ts index af2ae4a..6cbd25c 100644 --- a/utils/format-percentage.test.ts +++ b/utils/format-percentage.test.ts @@ -57,64 +57,3 @@ describe("formatPercentage", () => { expect(formatPercentage(999999.99)).toBe("999999%"); }); }); - describe("null values", () => { - it("should return '0%' for null", () => { - expect(formatPercentage(null)).toBe("0%"); - }); - }); - - describe("NaN values", () => { - it("should return '0%' for NaN", () => { - expect(formatPercentage(NaN)).toBe("0%"); - }); - }); - - describe("positive integers", () => { - it("should format positive integers correctly", () => { - expect(formatPercentage(0)).toBe("0%"); - expect(formatPercentage(1)).toBe("1%"); - expect(formatPercentage(50)).toBe("50%"); - expect(formatPercentage(100)).toBe("100%"); - expect(formatPercentage(999)).toBe("999%"); - }); - }); - - describe("positive decimals", () => { - it("should floor positive decimal values", () => { - expect(formatPercentage(0.1)).toBe("0%"); - expect(formatPercentage(0.9)).toBe("0%"); - expect(formatPercentage(1.1)).toBe("1%"); - expect(formatPercentage(1.9)).toBe("1%"); - expect(formatPercentage(50.5)).toBe("50%"); - expect(formatPercentage(99.99)).toBe("99%"); - }); - }); - - describe("negative numbers", () => { - it("should handle negative integers", () => { - expect(formatPercentage(-1)).toBe("-1%"); - expect(formatPercentage(-50)).toBe("-50%"); - expect(formatPercentage(-100)).toBe("-100%"); - }); - - it("should floor negative decimal values", () => { - expect(formatPercentage(-0.1)).toBe("-1%"); - expect(formatPercentage(-0.9)).toBe("-1%"); - expect(formatPercentage(-1.1)).toBe("-2%"); - expect(formatPercentage(-1.9)).toBe("-2%"); - expect(formatPercentage(-50.5)).toBe("-51%"); - }); - }); - - describe("edge cases", () => { - it("should handle very large numbers", () => { - expect(formatPercentage(1000000)).toBe("1000000%"); - expect(formatPercentage(999999.99)).toBe("999999%"); - }); - }); -}); - - describe("real world usage", () => { - it("should handle coverage percentage values", () => { - expect(formatPercentage(85.7)).toBe("85%"); - }); From b0b9f344ac17ee6d8db4dbff7074149245d14ce7 Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:21:00 +0000 Subject: [PATCH 08/11] Update utils/format-percentage.test.ts [skip ci] --- utils/format-percentage.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/format-percentage.test.ts b/utils/format-percentage.test.ts index 6cbd25c..6772950 100644 --- a/utils/format-percentage.test.ts +++ b/utils/format-percentage.test.ts @@ -1,6 +1,5 @@ import { formatPercentage } from "./format-percentage"; - describe("formatPercentage", () => { describe("null values", () => { it("should return '0%' for null", () => { From d5afd63e0c2052fec322160afbc7f67b29c330ea Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:21:20 +0000 Subject: [PATCH 09/11] Update utils/format-percentage.test.ts [skip ci] --- utils/format-percentage.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/format-percentage.test.ts b/utils/format-percentage.test.ts index 6772950..d1d0ea4 100644 --- a/utils/format-percentage.test.ts +++ b/utils/format-percentage.test.ts @@ -56,3 +56,4 @@ describe("formatPercentage", () => { expect(formatPercentage(999999.99)).toBe("999999%"); }); }); +}); From 88c50fdefcd0f479df73e4b4653dd889544873bd Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:22:03 +0000 Subject: [PATCH 10/11] Replace content of utils/format-percentage.test.ts [skip ci] --- utils/format-percentage.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/format-percentage.test.ts b/utils/format-percentage.test.ts index d1d0ea4..9e8e52d 100644 --- a/utils/format-percentage.test.ts +++ b/utils/format-percentage.test.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-var-requires */ import { formatPercentage } from "./format-percentage"; describe("formatPercentage", () => { From 2984eb90affaeaf8aa6e5e13d68f8fd3404c1fa8 Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:22:05 +0000 Subject: [PATCH 11/11] Empty commit to trigger final tests