budibase/packages/server/__mocks__/pg.js

20 lines
236 B
JavaScript
Raw Normal View History

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