1
0
Fork 0
mirror of synced 2024-10-01 09:38:55 +13:00
budibase/packages/server/src/integrations/tests/postgres.spec.js

39 lines
904 B
JavaScript
Raw Normal View History

2021-03-12 22:29:27 +13:00
const Airtable = require("airtable")
const { ElectronHttpExecutor } = require("electron-updater/out/electronHttpExecutor")
const AirtableIntegration = require("../airtable")
jest.mock("airtable")
class TestConfiguration {
constructor(config = {}) {
this.integration = new AirtableIntegration.integration(config)
}
}
describe("Airtable Integration", () => {
let config
beforeEach(() => {
config = new TestConfiguration()
})
it("calls the create method with the correct params", async () => {
const response = await config.integration.create({
table: "test",
json: ""
})
expect(config.integration.client.create).toHaveBeenCalledWith({})
})
it("calls the read method with the correct params", () => {
})
it("calls the update method with the correct params", () => {
})
it("calls the delete method with the correct params", () => {
})
})