budibase/packages/server/__mocks__/mysql.ts

15 lines
242 B
TypeScript
Raw Normal View History

module MySQLMock {
const mysql: any = {}
const client = {
connect: jest.fn(),
query: jest.fn((query, bindings, fn) => {
fn(null, [])
}),
}
mysql.createConnection = jest.fn(() => client)
module.exports = mysql
}