2021-03-16 14:54:39 +01:00
|
|
|
const mssql = {}
|
|
|
|
|
|
|
|
mssql.query = jest.fn(() => ({
|
|
|
|
recordset: [
|
|
|
|
{
|
|
|
|
a: "string",
|
|
|
|
b: 1,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}))
|
|
|
|
|
2021-05-24 13:14:04 +02:00
|
|
|
// mssql.connect = jest.fn(() => ({ recordset: [] }))
|
|
|
|
|
|
|
|
mssql.ConnectionPool = jest.fn(() => ({
|
|
|
|
connect: jest.fn(() => ({
|
|
|
|
request: jest.fn(() => ({
|
|
|
|
query: jest.fn(() => ({})),
|
|
|
|
})),
|
|
|
|
})),
|
|
|
|
}))
|
2021-03-16 14:54:39 +01:00
|
|
|
|
|
|
|
module.exports = mssql
|