Skip to content

Commit

Permalink
More failsafe crosslink asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
stscoundrel committed Aug 6, 2023
1 parent 6ab4403 commit 832fb93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/unit/lib/services/crosslinks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/pages/word.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
],
},
}
Expand Down

0 comments on commit 832fb93

Please sign in to comment.