From: Jérôme Benoit Date: Tue, 13 Feb 2024 23:54:12 +0000 (+0100) Subject: test: improve clone() test expectation X-Git-Tag: v1.2.37~60 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=cfab8dc9ea7801746461d4e8d6ac9852deb678b5;p=e-mobility-charging-stations-simulator.git test: improve clone() test expectation Signed-off-by: Jérôme Benoit --- diff --git a/tests/utils/Utils.test.ts b/tests/utils/Utils.test.ts index 3b2a52ae..3622d8ae 100644 --- a/tests/utils/Utils.test.ts +++ b/tests/utils/Utils.test.ts @@ -346,8 +346,10 @@ await describe('Utils test suite', async () => { expect(clone(url)).toStrictEqual({}) const map = new Map([['1', '2']]) expect(clone(map)).toStrictEqual(map) + expect(clone(map) === map).toBe(false) const set = new Set(['1']) expect(clone(set)).toStrictEqual(set) + expect(clone(set) === set).toBe(false) const weakMap = new WeakMap([[{ 1: 1 }, { 2: 2 }]]) expect(() => clone(weakMap)).toThrow(new Error('# could not be cloned.')) const weakSet = new WeakSet([{ 1: 1 }, { 2: 2 }])