From 58693aff95199f38b987807d6a9cb8e8401f68bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 15 Feb 2023 00:47:53 +0100 Subject: [PATCH] test(simulator): refine hasOwnProp() helper tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- test/utils/UtilsTest.ts | 4 ++++ 1 file changed, 4 insertions(+) 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()', () => { -- 2.34.1