1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-02 01:17:58 +02:00

feat(1-3260): use match object to verify that status code series is included

This commit is contained in:
Thomas Heartman 2025-01-22 09:02:56 +01:00
parent ef5209fe57
commit 648fc6079c
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78

View File

@ -245,10 +245,14 @@ test('can query for monthly aggregation of data for a specified range', async ()
now, now,
new Date(entry.month), new Date(entry.month),
); );
const expectedCount = expectedValues[index];
const expected = expectedValues[index]; expect(entry).toMatchObject({
statusCodeSeries: 200,
expect(entry.count).toBe(expected[entry.trafficGroup]); trafficGroup: expect.stringMatching(/group(A|B)/),
month: expect.stringMatching(/\d{4}-\d{2}/),
count: expectedCount[entry.trafficGroup],
});
} }
} }
}); });