@ -9,6 +9,14 @@ mssql.query = jest.fn(() => ({
],
}))
mssql.connect = jest.fn(() => ({ recordset: [] }))
// mssql.connect = jest.fn(() => ({ recordset: [] }))
mssql.ConnectionPool = jest.fn(() => ({
connect: jest.fn(() => ({
request: jest.fn(() => ({
query: jest.fn(() => ({})),
})),
module.exports = mssql
@ -32,7 +32,8 @@ describe("MS SQL Server Integration", () => {
})
describe("no rows returned", () => {
beforeEach(() => {
beforeEach(async () => {
await config.integration.connect()
config.integration.client.query.mockImplementation(() => ({ rows: [] }))