chore: Merge conflicts with master
This commit is contained in:
commit
24604f1b71
80 files changed
+1946
-1671
No files matched your search
@@ -1,5 +1,11 @@
|
||||
# Change Log
|
||||
|
||||
## 1.1.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#3407](https://github.com/medusajs/medusa/pull/3407) [`f0a1355fe`](https://github.com/medusajs/medusa/commit/f0a1355feb5160ff7de1f3d3da769efe29d0d8ed) Thanks [@adrien2p](https://github.com/adrien2p)! - feat(medusa): Bulk emit events
|
||||
|
||||
## 1.1.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "medusa-test-utils",
|
||||
"version": "1.1.38",
|
||||
"version": "1.1.39",
|
||||
"description": "Test utils for Medusa",
|
||||
"main": "dist/index.js",
|
||||
"repository": {
|
||||
|
||||
@@ -13,25 +13,33 @@ class MockRepo {
|
||||
findAndCount,
|
||||
del,
|
||||
count,
|
||||
insertBulk,
|
||||
}) {
|
||||
this.create_ = create;
|
||||
this.update_ = update;
|
||||
this.remove_ = remove;
|
||||
this.delete_ = del;
|
||||
this.softRemove_ = softRemove;
|
||||
this.find_ = find;
|
||||
this.findDescendantsTree_ = findDescendantsTree;
|
||||
this.findOne_ = findOne;
|
||||
this.findOneOrFail_ = findOneOrFail;
|
||||
this.save_ = save;
|
||||
this.findAndCount_ = findAndCount;
|
||||
this.findOneWithRelations_ = findOneWithRelations;
|
||||
this.create_ = create
|
||||
this.update_ = update
|
||||
this.remove_ = remove
|
||||
this.delete_ = del
|
||||
this.softRemove_ = softRemove
|
||||
this.find_ = find
|
||||
this.findDescendantsTree_ = findDescendantsTree
|
||||
this.findOne_ = findOne
|
||||
this.findOneOrFail_ = findOneOrFail
|
||||
this.save_ = save
|
||||
this.findAndCount_ = findAndCount
|
||||
this.findOneWithRelations_ = findOneWithRelations
|
||||
this.insertBulk_ = insertBulk
|
||||
}
|
||||
|
||||
setFindOne(fn) {
|
||||
this.findOne_ = fn
|
||||
}
|
||||
|
||||
insertBulk = jest.fn().mockImplementation((...args) => {
|
||||
if (this.insertBulk_) {
|
||||
return this.insertBulk_(...args)
|
||||
}
|
||||
return {}
|
||||
})
|
||||
create = jest.fn().mockImplementation((...args) => {
|
||||
if (this.create_) {
|
||||
return this.create_(...args)
|
||||
@@ -69,15 +77,10 @@ class MockRepo {
|
||||
if (this.findOne_) {
|
||||
return this.findOne_(...args)
|
||||
}
|
||||
});
|
||||
})
|
||||
findDescendantsTree = jest.fn().mockImplementation((...args) => {
|
||||
if (this.findDescendantsTree_) {
|
||||
return this.findDescendantsTree_(...args);
|
||||
}
|
||||
});
|
||||
findOneOrFail = jest.fn().mockImplementation((...args) => {
|
||||
if (this.findOneOrFail_) {
|
||||
return this.findOneOrFail_(...args)
|
||||
return this.findDescendantsTree_(...args)
|
||||
}
|
||||
})
|
||||
find = jest.fn().mockImplementation((...args) => {
|
||||
@@ -85,11 +88,6 @@ class MockRepo {
|
||||
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)
|
||||
|
||||
Reference in new issue
Block a user