From: Jérôme Benoit Date: Tue, 14 Feb 2023 23:47:53 +0000 (+0100) Subject: test(simulator): refine hasOwnProp() helper tests X-Git-Tag: v1.1.95~49 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=58693aff95199f38b987807d6a9cb8e8401f68bb;p=e-mobility-charging-stations-simulator.git test(simulator): refine hasOwnProp() helper tests Signed-off-by: Jérôme Benoit --- diff --git a/test/utils/UtilsTest.ts b/test/utils/UtilsTest.ts index 15099685..d6fd1f70 100644 --- a/test/utils/UtilsTest.ts +++ b/test/utils/UtilsTest.ts @@ -173,9 +173,13 @@ describe('Utils test suite', () => { expect(Utils.hasOwnProp([], '')).toBe(false); expect(Utils.hasOwnProp({}, '')).toBe(false); expect(Utils.hasOwnProp({ 1: 1 }, 1)).toBe(true); + expect(Utils.hasOwnProp({ 1: 1 }, '1')).toBe(true); expect(Utils.hasOwnProp({ 1: 1 }, 2)).toBe(false); + expect(Utils.hasOwnProp({ 1: 1 }, '2')).toBe(false); expect(Utils.hasOwnProp({ '1': '1' }, '1')).toBe(true); + expect(Utils.hasOwnProp({ '1': '1' }, 1)).toBe(true); expect(Utils.hasOwnProp({ '1': '1' }, '2')).toBe(false); + expect(Utils.hasOwnProp({ '1': '1' }, 2)).toBe(false); }); it('Verify isIterable()', () => {