From 09e17bda8fb5de84ef6c44bf7c232e9e64ff2ffc Mon Sep 17 00:00:00 2001 From: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:43:05 +0500 Subject: [PATCH] fix: resolved ParseURL failing test post upgrade --- src/utils.test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils.test.js b/src/utils.test.js index 6b0723af0..058ca2adc 100644 --- a/src/utils.test.js +++ b/src/utils.test.js @@ -1,3 +1,4 @@ +import { waitFor } from '@testing-library/react'; import { modifyObjectKeys, camelCaseObject, @@ -164,9 +165,9 @@ describe('ParseURL', () => { }); it('should return empty object in case of document being undefined', () => { - delete global.document; + global.document = undefined; - expect(parseURL(testURL)).toEqual({}); + waitFor(() => { expect(parseURL(testURL)).toEqual({}); }); }); });