budibase/packages/server/__mocks__/oracledb.ts

22 lines
295 B
TypeScript
Raw Normal View History

2024-03-19 17:50:48 +01:00
const executeMock = jest.fn(() => ({
rows: [
{
a: "string",
b: 1,
},
],
}))
2021-11-18 13:05:30 +01:00
2024-03-19 17:50:48 +01:00
const closeMock = jest.fn()
2021-11-18 13:05:30 +01:00
2024-03-19 17:50:48 +01:00
class Connection {
execute = executeMock
close = closeMock
}
2021-11-18 13:05:30 +01:00
2024-03-19 17:50:48 +01:00
module.exports = {
getConnection: jest.fn(() => new Connection()),
executeMock,
closeMock,
2021-11-18 13:05:30 +01:00
}