Skip to content

Commit

Permalink
use a reliable string sorting function
Browse files Browse the repository at this point in the history
  • Loading branch information
finlay-jisc committed Nov 26, 2024
1 parent 6ac2fe7 commit cac8f45
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ describe('Create live publication', () => {

expect(createPublicationRequest.status).toEqual(201);
expect(
createPublicationRequest.body.linkedTo.sort((a, b) => a.publicationToId - b.publicationToId)
createPublicationRequest.body.linkedTo.sort((a, b) => a.publicationToId.localeCompare(b.publicationToId))

Check warning on line 504 in api/src/components/publication/__tests__/createPublication.test.ts

View workflow job for this annotation

GitHub Actions / eslint

Unsafe return of an `any` typed value
).toMatchObject([
{ publicationToId: 'publication-problem-live', versionToId: 'publication-problem-live-v2', draft: false },
{
Expand Down

0 comments on commit cac8f45

Please sign in to comment.