2021-03-16 14:54:39 +01:00
|
|
|
const arangodb = {}
|
|
|
|
|
2021-05-03 09:31:09 +02:00
|
|
|
arangodb.Database = function () {
|
2021-03-16 14:54:39 +01:00
|
|
|
this.query = jest.fn(() => ({
|
|
|
|
all: jest.fn(),
|
|
|
|
}))
|
|
|
|
this.collection = jest.fn(() => "collection")
|
|
|
|
this.close = jest.fn()
|
|
|
|
}
|
|
|
|
|
|
|
|
arangodb.aql = (strings, ...args) => {
|
|
|
|
let str = strings.join("{}")
|
|
|
|
|
|
|
|
for (let arg of args) {
|
|
|
|
str = str.replace("{}", arg)
|
|
|
|
}
|
|
|
|
|
|
|
|
return str
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = arangodb
|