chore: Merge master to develop (#3653)

This commit is contained in:
Oliver Windall Juhl
2023-03-31 13:09:57 +02:00
committed by GitHub
parent b2e2eddcea
commit 809ab2e0eb
120 changed files with 2240 additions and 585 deletions
@@ -1,11 +1,12 @@
export default {
connection: {
getMetadata: (target) => {
return target["metadata"] ?? {
columns: []
}
}
return (
target["metadata"] ?? {
columns: [],
}
)
},
},
getRepository: function (repo) {
@@ -14,7 +14,7 @@ class MockRepo {
del,
count,
insertBulk,
metadata
metadata,
}) {
this.create_ = create
this.update_ = update
@@ -31,7 +31,7 @@ class MockRepo {
this.insertBulk_ = insertBulk
this.metadata = metadata ?? {
columns: []
columns: [],
}
}
@@ -88,22 +88,11 @@ class MockRepo {
return this.findDescendantsTree_(...args)
}
})
findOneOrFail = jest.fn().mockImplementation((...args) => {
if (this.findOneOrFail_) {
return this.findOneOrFail_(...args)
}
})
find = jest.fn().mockImplementation((...args) => {
if (this.find_) {
return this.find_(...args)
}
})
softRemove = jest.fn().mockImplementation((...args) => {
if (this.softRemove_) {
return this.softRemove_(...args)
}
})
save = jest.fn().mockImplementation((...args) => {
if (this.save_) {
return this.save_(...args)