feat: adds discount code search functionality (#155)

This commit is contained in:
Oliver Windall Juhl
2021-01-27 11:13:24 +01:00
committed by GitHub
parent 103749eb65
commit 7e14da1225
6 changed files with 160 additions and 16 deletions
@@ -7,6 +7,7 @@ export default ({
findOne,
findOneOrFail,
save,
findAndCount,
} = {}) => {
return {
create: jest.fn().mockImplementation((...args) => {
@@ -63,5 +64,11 @@ export default ({
}
return Promise.resolve(...args);
}),
findAndCount: jest.fn().mockImplementation((...args) => {
if (findAndCount) {
return findAndCount(...args);
}
return {};
}),
};
};