Prepare reusing

This commit is contained in:
Adria Navarro 2024-08-23 10:55:46 +02:00
parent a3bbbb32be
commit 329fefc7dd
1 changed files with 57 additions and 52 deletions

View File

@ -2533,7 +2533,11 @@ describe.each([
tableId = table._id!
})
it("can retrieve rows with populated relationships", async () => {
it.each([
["get row", (rowId: string) => config.api.row.get(tableId, rowId)],
])(
"can retrieve rows with populated relationships (via %s)",
async (__, retrieveDelegate) => {
const otherRows = _.sampleSize(auxData, 5)
const row = await config.api.row.save(tableId, {
@ -2545,7 +2549,7 @@ describe.each([
relWithIllegalSchema: [otherRows[4]],
})
const retrieved = await config.api.row.get(tableId, row._id!)
const retrieved = await retrieveDelegate(row._id!)
expect(retrieved).toEqual(
expect.objectContaining({
title: row.title,
@ -2586,7 +2590,8 @@ describe.each([
],
})
)
})
}
)
})
describe("Formula fields", () => {