From 85cb4af76ed4ae63c8bd826c821df67d5da53c93 Mon Sep 17 00:00:00 2001 From: dbauszus-glx Date: Fri, 3 Nov 2023 09:40:26 +0000 Subject: [PATCH] remove clone test --- tests/mod/utils/clone.test.js | 42 ----------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 tests/mod/utils/clone.test.js diff --git a/tests/mod/utils/clone.test.js b/tests/mod/utils/clone.test.js deleted file mode 100644 index 4121d21d1d..0000000000 --- a/tests/mod/utils/clone.test.js +++ /dev/null @@ -1,42 +0,0 @@ -const clone = require('../../../mod/utils/clone'); - -describe('clone', () => { - test('should return the cloned object', () => { - const obj = { - name: 'John', - age: 30, - address: { - street: '123 Main St', - city: 'New York', - }, - hobbies: ['reading', 'painting'], - }; - - const clonedObj = clone(obj); - - expect(clonedObj).toEqual(obj); - expect(clonedObj).not.toBe(obj); - }); - - test('should handle circular references', () => { - const obj = { prop: null }; - obj.prop = obj; - - const clonedObj = clone(obj); - - expect(clonedObj).toEqual(obj); - expect(clonedObj.prop).toBe(clonedObj); - }); - - test('should return the same value if not an object or null', () => { - const str = 'hello'; - const num = 42; - const bool = true; - const fn = () => {}; - - expect(clone(str)).toBe(str); - expect(clone(num)).toBe(num); - expect(clone(bool)).toBe(bool); - expect(clone(fn)).toBe(fn); - }); -});