When the order matters:
expect(array1).toEqual(array2)
Regardless of order:
expect(array1).toEqual(jasmine.arrayWithExactContents(array2))
Ignoring extra elements:
expect(array1).toEqual(jasmine.arrayContaining(array2))
Posted by Henning Koch to makandra dev (2022-02-12 12:43)