1
0
Fork 0
mirror of synced 2024-10-02 10:08:09 +13:00

Get tests passing against a real MySQL.

This commit is contained in:
Sam Rose 2024-03-12 09:57:59 +00:00
parent c34fa61479
commit 186f916b40
No known key found for this signature in database

View file

@ -38,11 +38,16 @@ import * as uuid from "uuid"
const timestamp = new Date("2023-01-26T11:48:57.597Z").toISOString()
tk.freeze(timestamp)
jest.setTimeout(99999999)
jest.unmock("mysql2")
jest.unmock("mysql2/promise")
const { basicRow } = setup.structures
describe.each([
["internal", undefined],
["postgres", databaseTestProviders.postgres],
// ["internal", undefined],
// ["postgres", databaseTestProviders.postgres],
["mysql", databaseTestProviders.mysql],
])("/rows (%s)", (__, dsProvider) => {
const isInternal = !dsProvider
@ -70,7 +75,7 @@ describe.each([
const generateTableConfig: () => SaveTableRequest = () => {
return {
name: uuid.v4(),
name: uuid.v4().substring(0, 16),
type: "table",
primary: ["id"],
primaryDisplay: "name",
@ -641,7 +646,7 @@ describe.each([
const createdRow = await config.createRow()
const res = await config.api.row.bulkDelete(table._id!, {
rows: [createdRow, { _id: "2" }],
rows: [createdRow, { _id: "9999999" }],
})
expect(res[0]._id).toEqual(createdRow._id)