2021-03-12 10:29:27 +01:00
|
|
|
const { ElectronHttpExecutor } = require("electron-updater/out/electronHttpExecutor")
|
|
|
|
const { integration } = require("../airtable")
|
2021-03-15 17:07:04 +01:00
|
|
|
const Airtable = require("airtable")
|
2021-03-12 10:29:27 +01:00
|
|
|
jest.mock("airtable")
|
|
|
|
|
|
|
|
class TestConfiguration {
|
|
|
|
constructor(config = {}) {
|
|
|
|
this.integration = new integration(config)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-15 17:07:04 +01:00
|
|
|
xdescribe("Airtable Integration", () => {
|
2021-03-12 10:29:27 +01: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-15 17:07:04 +01:00
|
|
|
json: {}
|
2021-03-12 10:29:27 +01:00
|
|
|
})
|
2021-03-15 17:07:04 +01:00
|
|
|
console.log(config.integration.client)
|
|
|
|
expect(config.integration.client.create).toHaveBeenCalledWith({})
|
2021-03-12 10:29:27 +01: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", () => {
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|