1
0
Fork 0
mirror of synced 2024-08-21 13:01:47 +12:00
budibase/packages/server/__mocks__/pg.js
2021-03-15 16:07:04 +00:00

21 lines
282 B
JavaScript

const pg = {}
// constructor
function Client() {
this.query = jest.fn(() => ({ rows: [] }))
}
Client.prototype.query = jest.fn(() => ({
rows: [
{
a: "string",
b: 1,
},
],
}))
Client.prototype.connect = jest.fn()
pg.Client = Client
module.exports = pg