1
0
Fork 0
mirror of synced 2024-07-04 05:50:57 +12:00
budibase/packages/server/__mocks__/pg.ts
2024-03-19 16:50:48 +00:00

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,
}