test: improve clone() test expectation
[e-mobility-charging-stations-simulator.git] / 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 }])