1
0
Fork 0
mirror of synced 2024-07-14 18:55:45 +12:00

Test different sort

This commit is contained in:
Adria Navarro 2023-07-18 15:37:23 +02:00
parent b778921028
commit 82e2385099

View file

@ -790,7 +790,37 @@ describe("/rows", () => {
},
["Danny", "Charly", "Bob", "Alice"],
],
])("allow sorting", async (sortParams, expected) => {
[
{
field: "age",
order: SortOrder.ASCENDING,
type: SortType.number,
},
["Danny", "Alice", "Charly", "Bob"],
],
[
{
field: "age",
order: SortOrder.ASCENDING,
},
["Danny", "Alice", "Charly", "Bob"],
],
[
{
field: "age",
order: SortOrder.DESCENDING,
},
["Bob", "Charly", "Alice", "Danny"],
],
[
{
field: "age",
order: SortOrder.DESCENDING,
type: SortType.number,
},
["Bob", "Charly", "Alice", "Danny"],
],
])("allow sorting (%s)", async (sortParams, expected) => {
await config.createTable(userTable())
const users = [
{ name: "Alice", age: 25 },