1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-06-04 01:18:20 +02:00

Fix failing segment test (#1781)

* Fix segment test

* Fix failing test
This commit is contained in:
sellinjaanus 2022-06-30 15:57:07 +00:00 committed by GitHub
parent 7c275917f3
commit 01a8273bd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ import {
DEFAULT_STRATEGY_SEGMENTS_LIMIT,
} from '../../../../lib/util/segments';
import { collectIds } from '../../../../lib/util/collect-ids';
import { arraysHaveSameItems } from '../../../../lib/util/arraysHaveSameItems';
let db: ITestDb;
let app: IUnleashTest;
@ -309,5 +310,7 @@ test('should send all segments that are in use by feature', async () => {
.flat()
.filter((x) => !!x);
const toggleSegmentIds = [...new Set(allSegmentIds)];
expect(globalSegmentIds).toEqual(toggleSegmentIds);
expect(arraysHaveSameItems(globalSegmentIds, toggleSegmentIds)).toEqual(
true,
);
});