fix: adds tests

This commit is contained in:
Sebastian Rindom committed 2021-04-06 18:55:11 +02:00
1 parent fa1fe9d619
commit 69442a1735
6 files changed
+229 -2240

No files matched your search

@@ -1,4 +1,8 @@
export default {
getRepository: function (repo) {
return repo;
},
getCustomRepository: function (repo) {
return repo;
},
@@ -10,10 +10,12 @@ class MockRepo {
findOneOrFail,
save,
findAndCount,
del,
}) {
this.create_ = create;
this.update_ = update;
this.remove_ = remove;
this.delete_ = del;
this.softRemove_ = softRemove;
this.find_ = find;
this.findOne_ = findOne;
@@ -93,6 +95,12 @@ class MockRepo {
}
return {};
});
delete = jest.fn().mockImplementation((...args) => {
if (this.delete_) {
return this.delete_(...args);
}
return {};
});
}
export default (methods = {}) => {