Fix flaky client/rest/general/ping test (#8533)

This commit is contained in:
Joram Wilander 2025-01-29 13:33:34 -05:00 committed by GitHub
parent 8fae132afa
commit 0bac4b96f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 () => {