1
0
Fork 0
mirror of synced 2024-07-15 03:05:57 +12:00

Fix tests

This commit is contained in:
Adria Navarro 2024-01-29 15:27:09 +01:00
parent d806029075
commit aca7b50dc5
2 changed files with 6 additions and 4 deletions

View file

@ -324,7 +324,7 @@ describe("test the link controller", () => {
name: "link",
autocolumn: true,
}
await config.updateTable(table)
await config.upsertTable(table)
})
it("should be able to remove a linked field from a table, even if the linked table does not exist", async () => {

View file

@ -8,10 +8,10 @@ import {
FieldType,
Table,
AutoFieldSubType,
AutoColumnFieldMetadata,
} from "@budibase/types"
import TestConfiguration from "../../../../tests/utilities/TestConfiguration"
import { cache } from "@budibase/backend-core"
tk.freeze(Date.now())
@ -213,8 +213,10 @@ describe("sdk >> rows >> internal", () => {
)
const persistedTable = await config.getTable(table._id)
expect((table as any).schema.id.lastID).toBe(0)
expect(persistedTable.schema.id.lastID).toBe(20)
expect((table.schema.id as AutoColumnFieldMetadata).lastID).toBe(0)
expect((persistedTable.schema.id as AutoColumnFieldMetadata).lastID).toBe(
20
)
})
})
})