1
0
Fork 0
mirror of synced 2024-09-18 10:20:11 +12:00
budibase/packages/server/src/integrations/tests/airtable.spec.js

39 lines
923 B
JavaScript
Raw Normal View History

2021-03-12 22:29:27 +13:00
const { ElectronHttpExecutor } = require("electron-updater/out/electronHttpExecutor")
const { integration } = require("../airtable")
2021-03-16 05:07:04 +13:00
const Airtable = require("airtable")
2021-03-12 22:29:27 +13:00
jest.mock("airtable")
class TestConfiguration {
constructor(config = {}) {
this.integration = new integration(config)
}
}
2021-03-16 05:07:04 +13:00
xdescribe("Airtable Integration", () => {
2021-03-12 22:29:27 +13:00
let config
beforeEach(() => {
config = new TestConfiguration()
})
it("calls the create method with the correct params", async () => {
const response = await config.integration.create({
table: "test",
2021-03-16 05:07:04 +13:00
json: {}
2021-03-12 22:29:27 +13:00
})
2021-03-16 05:07:04 +13:00
console.log(config.integration.client)
expect(config.integration.client.create).toHaveBeenCalledWith({})
2021-03-12 22:29:27 +13:00
})
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", () => {
})
})