Fix tests
This commit is contained in:
parent
d806029075
commit
aca7b50dc5
2 changed files with 6 additions and 4 deletions
|
@ -324,7 +324,7 @@ describe("test the link controller", () => {
|
||||||
name: "link",
|
name: "link",
|
||||||
autocolumn: true,
|
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 () => {
|
it("should be able to remove a linked field from a table, even if the linked table does not exist", async () => {
|
||||||
|
|
|
@ -8,10 +8,10 @@ import {
|
||||||
FieldType,
|
FieldType,
|
||||||
Table,
|
Table,
|
||||||
AutoFieldSubType,
|
AutoFieldSubType,
|
||||||
|
AutoColumnFieldMetadata,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
import TestConfiguration from "../../../../tests/utilities/TestConfiguration"
|
import TestConfiguration from "../../../../tests/utilities/TestConfiguration"
|
||||||
import { cache } from "@budibase/backend-core"
|
|
||||||
|
|
||||||
tk.freeze(Date.now())
|
tk.freeze(Date.now())
|
||||||
|
|
||||||
|
@ -213,8 +213,10 @@ describe("sdk >> rows >> internal", () => {
|
||||||
)
|
)
|
||||||
|
|
||||||
const persistedTable = await config.getTable(table._id)
|
const persistedTable = await config.getTable(table._id)
|
||||||
expect((table as any).schema.id.lastID).toBe(0)
|
expect((table.schema.id as AutoColumnFieldMetadata).lastID).toBe(0)
|
||||||
expect(persistedTable.schema.id.lastID).toBe(20)
|
expect((persistedTable.schema.id as AutoColumnFieldMetadata).lastID).toBe(
|
||||||
|
20
|
||||||
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue