2021-03-15 17:26:46 +01:00
|
|
|
const mysql = {}
|
|
|
|
|
|
|
|
const client = {
|
|
|
|
connect: jest.fn(),
|
2021-06-03 19:48:04 +02:00
|
|
|
query: jest.fn((query, fn) => {
|
|
|
|
fn(null, [])
|
|
|
|
}),
|
2021-03-15 17:26:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
mysql.createConnection = jest.fn(() => client)
|
|
|
|
|
|
|
|
module.exports = mysql
|