From b9c918a2c297aaa01be6bf4a47ffab2712dd93ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 27 Jan 2023 00:31:03 +0100 Subject: [PATCH] UTs cleanup 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/utils/UtilsTest.ts b/test/utils/UtilsTest.ts index 019dc771..293c24d3 100644 --- a/test/utils/UtilsTest.ts +++ b/test/utils/UtilsTest.ts @@ -149,8 +149,8 @@ describe('Utils test suite', () => { expect(Utils.isIterable('')).toBe(true); expect(Utils.isIterable(' ')).toBe(true); expect(Utils.isIterable('test')).toBe(true); - expect(Utils.isIterable(null)).toBe(false); expect(Utils.isIterable(undefined)).toBe(false); + expect(Utils.isIterable(null)).toBe(false); expect(Utils.isIterable(0)).toBe(false); expect(Utils.isIterable([0, 1])).toBe(true); expect(Utils.isIterable({ 1: 1 })).toBe(false); @@ -167,8 +167,8 @@ describe('Utils test suite', () => { expect(Utils.isEmptyString('test')).toBe(false); expect(Utils.isEmptyString(' test')).toBe(false); expect(Utils.isEmptyString('test ')).toBe(false); - expect(Utils.isEmptyString(null)).toBe(false); expect(Utils.isEmptyString(undefined)).toBe(false); + expect(Utils.isEmptyString(null)).toBe(false); expect(Utils.isEmptyString(0)).toBe(false); expect(Utils.isEmptyString({})).toBe(false); expect(Utils.isEmptyString([])).toBe(false); @@ -192,8 +192,8 @@ describe('Utils test suite', () => { }); it('Verify isNullOrUndefined()', () => { - expect(Utils.isNullOrUndefined(null)).toBe(true); expect(Utils.isNullOrUndefined(undefined)).toBe(true); + expect(Utils.isNullOrUndefined(null)).toBe(true); expect(Utils.isNullOrUndefined('')).toBe(false); expect(Utils.isNullOrUndefined(0)).toBe(false); expect(Utils.isNullOrUndefined({})).toBe(false); @@ -207,8 +207,8 @@ describe('Utils test suite', () => { it('Verify isEmptyArray()', () => { expect(Utils.isEmptyArray([])).toBe(true); expect(Utils.isEmptyArray([1, 2])).toBe(false); - expect(Utils.isEmptyArray(null)).toBe(true); expect(Utils.isEmptyArray(undefined)).toBe(true); + expect(Utils.isEmptyArray(null)).toBe(true); expect(Utils.isEmptyArray('')).toBe(true); expect(Utils.isEmptyArray('test')).toBe(true); expect(Utils.isEmptyArray(0)).toBe(true); @@ -222,8 +222,8 @@ describe('Utils test suite', () => { it('Verify isEmptyObject()', () => { expect(Utils.isEmptyObject({})).toBe(true); expect(Utils.isEmptyObject({ 1: 1, 2: 2 })).toBe(false); - expect(Utils.isEmptyObject(null)).toBe(false); expect(Utils.isEmptyObject(undefined)).toBe(false); + expect(Utils.isEmptyObject(null)).toBe(false); expect(Utils.isEmptyObject(new Map())).toBe(false); expect(Utils.isEmptyObject(new Set())).toBe(false); expect(Utils.isEmptyObject(new WeakMap())).toBe(false); -- 2.34.1