From 85b7336a54c1cdae1f5ff48b9a0d5132970b5f83 Mon Sep 17 00:00:00 2001 From: Pascal Syma Date: Fri, 13 Dec 2024 14:52:35 +0100 Subject: [PATCH] Add negative test for isInteger Signed-off-by: Pascal Syma --- utils/coordinates.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/coordinates.test.ts b/utils/coordinates.test.ts index da0cd50..00f3f74 100644 --- a/utils/coordinates.test.ts +++ b/utils/coordinates.test.ts @@ -108,6 +108,8 @@ describe('coordinates utils', () => { expect(isInteger([1, 2, 3])).toBeTrue(); expect(isInteger([0, 0])).toBeTrue(); expect(isInteger([0, 10.001])).toBeFalse(); + expect(isInteger([-1, -3])).toBeTrue(); + expect(isInteger([0, -222])).toBeTrue(); expect(isInteger([472.2948292, 10.001])).toBeFalse(); expect(isInteger([-472.2948292, 10.001])).toBeFalse(); expect(isInteger([-472.2948292, -10.001])).toBeFalse();