budibase/packages/server/__mocks__/mysql2/promise.ts

18 lines
271 B
TypeScript
Raw Normal View History

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