From 0bac4b96f0d2b64c42c6ecde60f252182ef2971a Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 29 Jan 2025 13:33:34 -0500 Subject: [PATCH] Fix flaky client/rest/general/ping test (#8533) --- app/client/rest/general.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/client/rest/general.test.ts b/app/client/rest/general.test.ts index 16ed091ab..634f8782f 100644 --- a/app/client/rest/general.test.ts +++ b/app/client/rest/general.test.ts @@ -22,12 +22,12 @@ describe('ClientGeneral', () => { const deviceId = 'device1'; const timeoutInterval = 1000; const groupLabel = 'DeepLink'; - const expectedUrl = `${client.urlVersion}/system/ping?time=${Date.now()}&device_id=${deviceId}`; + const expectedUrl = `${client.urlVersion}/system/ping`; const expectedOptions = {method: 'get', timeoutInterval, groupLabel}; await client.ping(deviceId, timeoutInterval, groupLabel); - expect(client.doFetch).toHaveBeenCalledWith(expectedUrl, expectedOptions, false); + expect(client.doFetch).toHaveBeenCalledWith(expect.stringContaining(expectedUrl), expectedOptions, false); }); test('logClientError', async () => {