budibase/packages/server/__mocks__/pg.ts

26 lines
298 B
TypeScript

const query = jest.fn(() => ({
rows: [
{
a: "string",
b: 1,
},
],
}))
class Client {
query = query
end = jest.fn(cb => {
if (cb) cb()
})
connect = jest.fn()
release = jest.fn()
}
const on = jest.fn()
module.exports = {
Client,
queryMock: query,
on,
}