Skip to content

Commit aeb1b4a

Browse files
committed
Added test for corner case of function.
1 parent 36b5a62 commit aeb1b4a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/instant-meilisearch/__tests__/sort.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ describe('Sort browser test', () => {
6363
])
6464
})
6565

66+
test('split multiple sorting rules in different order', () => {
67+
const sortRules = splitSortString(
68+
'title:asc,_geoPoint(37.8153, -122.4784):asc,description:desc'
69+
)
70+
71+
expect(sortRules).toEqual([
72+
'title:asc',
73+
'_geoPoint(37.8153, -122.4784):asc',
74+
'description:desc',
75+
])
76+
})
77+
6678
test('split one sorting rule', () => {
6779
const sortRules = splitSortString('_geoPoint(37.8153, -122.4784):asc')
6880

0 commit comments

Comments
 (0)