fix(product): when running migrations, prevent exploding on isolated case (#5643)
* fix(product): when running migrations, prevent exploding on isolated case * chore: remove try catch block * chore: added variant test fixes * chore: update name of var
This commit is contained in:
1 parent
c51dce164d
commit
c4722715cd
3 files changed
+14
-12
No files matched your search
+9
-4
@@ -170,6 +170,8 @@ describe("ProductModuleService products", function () {
|
||||
thumbnail: images[0],
|
||||
})
|
||||
|
||||
const variantTitle = data.variants[0].title
|
||||
|
||||
const updateData = {
|
||||
...data,
|
||||
id: productOne.id,
|
||||
@@ -191,11 +193,14 @@ describe("ProductModuleService products", function () {
|
||||
],
|
||||
})
|
||||
|
||||
expect(product.images).toHaveLength(1)
|
||||
expect(product.variants[0].options).toHaveLength(1)
|
||||
expect(product.tags).toHaveLength(1)
|
||||
expect(product.variants).toHaveLength(1)
|
||||
const createdVariant = product.variants.find(
|
||||
(v) => v.title === variantTitle
|
||||
)
|
||||
|
||||
expect(product.images).toHaveLength(1)
|
||||
expect(createdVariant?.options).toHaveLength(1)
|
||||
expect(product.tags).toHaveLength(1)
|
||||
expect(product.variants).toHaveLength(2)
|
||||
expect(product).toEqual(
|
||||
expect.objectContaining({
|
||||
id: expect.any(String),
|
||||
|
||||
Reference in new issue
Block a user