mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
8c1d4838b8
* fix: apply query from checkProjectsCompatibility * fix: require equal environments when moving toggles * refactor: clean up project service tests * refactor: add test for project compatibility check * refactor: improve arraysHaveSameItems name
18 lines
909 B
TypeScript
18 lines
909 B
TypeScript
import { arraysHaveSameItems } from './arraysHaveSameItems';
|
|
|
|
test('arraysHaveSameItems', () => {
|
|
expect(arraysHaveSameItems([], [])).toEqual(true);
|
|
expect(arraysHaveSameItems([1], [1])).toEqual(true);
|
|
expect(arraysHaveSameItems([1], [1, 1])).toEqual(true);
|
|
expect(arraysHaveSameItems([1, 1], [1])).toEqual(true);
|
|
expect(arraysHaveSameItems([1, 2], [1, 2])).toEqual(true);
|
|
expect(arraysHaveSameItems([1, 2], [2, 1])).toEqual(true);
|
|
expect(arraysHaveSameItems([1, 2], [2, 2, 1])).toEqual(true);
|
|
expect(arraysHaveSameItems([1], [])).toEqual(false);
|
|
expect(arraysHaveSameItems([1], [2])).toEqual(false);
|
|
expect(arraysHaveSameItems([1, 2], [1, 3])).toEqual(false);
|
|
expect(arraysHaveSameItems([1, 2], [1, 2, 3])).toEqual(false);
|
|
expect(arraysHaveSameItems([1, 2, 3], [1, 2])).toEqual(false);
|
|
expect(arraysHaveSameItems([1, 2, 3], [1, 2, 4])).toEqual(false);
|
|
});
|