From cfab8dc9ea7801746461d4e8d6ac9852deb678b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 14 Feb 2024 00:54:12 +0100 Subject: [PATCH] test: improve clone() test expectation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- tests/utils/Utils.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/utils/Utils.test.ts b/tests/utils/Utils.test.ts index 3b2a52ae8..3622d8aec 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 }])