Fix tests.

This commit is contained in:
Sam Rose 2024-04-11 17:16:32 +01:00
parent 12fdaefe4c
commit a024a28de1
No known key found for this signature in database
1 changed files with 30 additions and 48 deletions

View File

@ -271,6 +271,7 @@ describe.each([
expectQuery({ expectQuery({
range: { age: { low: 5, high: 10 } }, range: { age: { low: 5, high: 10 } },
}).toContain([{ age: 10 }])) }).toContain([{ age: 10 }]))
})
describe("sort", () => { describe("sort", () => {
it("sorts ascending", () => it("sorts ascending", () =>
@ -305,25 +306,6 @@ describe.each([
sortOrder: SortOrder.DESCENDING, sortOrder: SortOrder.DESCENDING,
}).toMatch([{ age: 10 }, { age: 1 }])) }).toMatch([{ age: 10 }, { age: 1 }]))
}) })
describe("sortType STRING", () => {
it("sorts ascending", () =>
expectSearch({
query: {},
sort: "age",
sortType: SortType.STRING,
sortOrder: SortOrder.ASCENDING,
}).toMatch([{ age: 1 }, { age: 10 }]))
it("sorts descending", () =>
expectSearch({
query: {},
sort: "age",
sortType: SortType.STRING,
sortOrder: SortOrder.DESCENDING,
}).toMatch([{ age: 10 }, { age: 1 }]))
})
})
}) })
describe("dates", () => { describe("dates", () => {