1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-31 13:47:02 +02:00

chore: don't fail if array is not ordered properly (#10391)

Spotted it here:
https://github.com/Unleash/unleash/actions/runs/16443263365/job/46468801248
<img width="928" height="584" alt="image"
src="https://github.com/user-attachments/assets/5e430b91-2664-4a79-9f13-cf6da4640046"
/>

where the sort order is different.
This commit is contained in:
Gastón Fournier 2025-07-22 14:30:56 +02:00 committed by GitHub
parent e140ab63e1
commit 020e9a49ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -254,9 +254,12 @@ test('should not backfill for existing lifecycle', async () => {
await featureLifecycleStore.backfill();
const { body } = await getFeatureLifecycle('my_feature_e');
expect(body).toEqual([
{ stage: 'initial', enteredStageAt: expect.any(String) },
{ stage: 'pre-live', enteredStageAt: expect.any(String) },
{ stage: 'live', enteredStageAt: expect.any(String) },
]);
expect(body).toEqual(
expect.arrayContaining([
{ stage: 'initial', enteredStageAt: expect.any(String) },
{ stage: 'pre-live', enteredStageAt: expect.any(String) },
{ stage: 'live', enteredStageAt: expect.any(String) },
]),
);
expect(body).toHaveLength(3);
});