1
0
Fork 0
mirror of synced 2024-07-05 14:31:17 +12:00
budibase/packages/server/__mocks__/pg.js

22 lines
282 B
JavaScript
Raw Normal View History

const pg = {}
// constructor
2021-03-16 05:07:04 +13:00
function Client() {
this.query = jest.fn(() => ({ rows: [] }))
}
2021-03-16 05:07:04 +13:00
Client.prototype.query = jest.fn(() => ({
rows: [
{
a: "string",
b: 1,
},
],
}))
Client.prototype.connect = jest.fn()
pg.Client = Client
module.exports = pg