fix tests
This commit is contained in:
parent
495a255987
commit
be7a8cfb8c
|
@ -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
|
module.exports = mssql
|
||||||
|
|
|
@ -32,7 +32,8 @@ describe("MS SQL Server Integration", () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("no rows returned", () => {
|
describe("no rows returned", () => {
|
||||||
beforeEach(() => {
|
beforeEach(async () => {
|
||||||
|
await config.integration.connect()
|
||||||
config.integration.client.query.mockImplementation(() => ({ rows: [] }))
|
config.integration.client.query.mockImplementation(() => ({ rows: [] }))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue