Skip to content

Commit

Permalink
Fix failing segment test (#1781)
Browse files Browse the repository at this point in the history
* Fix segment test

* Fix failing test
  • Loading branch information
sellinjaanus committed Jun 30, 2022
1 parent 7c27591 commit 01a8273
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/test/e2e/api/client/segment.e2e.test.ts
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
);
});

0 comments on commit 01a8273

Please sign in to comment.