1
0
Fork 0
mirror of synced 2024-07-08 15:56:23 +12:00

Fixing test case.

This commit is contained in:
mike12345567 2023-10-05 23:19:11 +01:00
parent 10fffef467
commit 7976772842

View file

@ -16,6 +16,7 @@ jest.mock("../../sdk", () => ({
import sdk from "../../sdk"
import { Next } from "koa"
const tableId = utils.generateTableID()
const mockGetView = sdk.views.get as jest.MockedFunction<typeof sdk.views.get>
const mockGetTable = sdk.tables.getTable as jest.MockedFunction<
typeof sdk.tables.getTable
@ -41,6 +42,7 @@ class TestConfiguration {
body: ctxRequestBody,
}
this.params.viewId = viewId
this.params.sourceId = tableId
return this.middleware(
{
request: this.request as any,
@ -69,7 +71,7 @@ describe("trimViewRowInfo middleware", () => {
})
const table: Table = {
_id: utils.generateTableID(),
_id: tableId,
name: generator.word(),
type: "table",
schema: {