diff --git a/backend/src/schema/resolvers/users/location.spec.js b/backend/src/schema/resolvers/users/location.spec.js index f150e8594..92f08893e 100644 --- a/backend/src/schema/resolvers/users/location.spec.js +++ b/backend/src/schema/resolvers/users/location.spec.js @@ -119,25 +119,27 @@ describe('Location Service', () => { lang: 'en', } const result = await query({ query: queryLocations, variables }) - expect(result.data.queryLocations).toEqual([ - { id: 'place.14094307404564380', place_name: 'Berlin, Germany' }, - { - id: expect.stringMatching(/^place\.[0-9]+$/), - place_name: 'Berlin, Maryland, United States', - }, - { - id: expect.stringMatching(/^place\.[0-9]+$/), - place_name: 'Berlin, Connecticut, United States', - }, - { - id: expect.stringMatching(/^place\.[0-9]+$/), - place_name: 'Berlin, New Jersey, United States', - }, - { - id: expect.stringMatching(/^place\.[0-9]+$/), - place_name: 'Berlin Heights, Ohio, United States', - }, - ]) + expect(result.data.queryLocations).toEqual( + expect.arrayContaining([ + { id: 'place.14094307404564380', place_name: 'Berlin, Germany' }, + { + id: expect.stringMatching(/^place\.[0-9]+$/), + place_name: 'Berlin, Maryland, United States', + }, + { + id: expect.stringMatching(/^place\.[0-9]+$/), + place_name: 'Berlin, Connecticut, United States', + }, + { + id: expect.stringMatching(/^place\.[0-9]+$/), + place_name: 'Berlin, New Jersey, United States', + }, + { + id: expect.stringMatching(/^place\.[0-9]+$/), + place_name: 'Berlin Heights, Ohio, United States', + }, + ]), + ) }) it('query Location existing in different language', async () => {