diff --git a/tests/unit/lib/services/crosslinks.test.ts b/tests/unit/lib/services/crosslinks.test.ts index 8e3ee63..18230b2 100644 --- a/tests/unit/lib/services/crosslinks.test.ts +++ b/tests/unit/lib/services/crosslinks.test.ts @@ -37,9 +37,9 @@ describe('Crosslinks service tests', () => { url: 'https://old-norwegian-dictionary.vercel.app/word/aaustr', source: 'old-norwegian', }, - ] + ].sort((a, b) => (a.source > b.source ? 1 : -1)) - const result = getCrossLinks(entry2) + const result = getCrossLinks(entry2).sort((a, b) => (a.source > b.source ? 1 : -1)) expect(result).toEqual(expected) }) diff --git a/tests/unit/pages/word.test.tsx b/tests/unit/pages/word.test.tsx index 9f6fc6c..faae4b0 100644 --- a/tests/unit/pages/word.test.tsx +++ b/tests/unit/pages/word.test.tsx @@ -140,14 +140,14 @@ describe('Word page: data fetching', () => { ], letters: getAlphabet(), crosslinks: [ - { - url: 'https://cleasby-vigfusson-dictionary.vercel.app/word/leyni-dyrr', - source: 'old-norse', - }, { source: 'old-norwegian', url: 'https://old-norwegian-dictionary.vercel.app/word/leynidyrr', }, + { + url: 'https://cleasby-vigfusson-dictionary.vercel.app/word/leyni-dyrr', + source: 'old-norse', + }, ], }, }