test: improve clone() test expectation
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 13 Feb 2024 23:54:12 +0000 (00:54 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 13 Feb 2024 23:54:12 +0000 (00:54 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
tests/utils/Utils.test.ts

index 3b2a52ae88d8b33911033f607155d0c3a89daaf3..3622d8aec45cb0e80ad81381bf46af96b30b6362 100644 (file)
@@ -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('#<WeakMap> could not be cloned.'))
     const weakSet = new WeakSet([{ 1: 1 }, { 2: 2 }])