fix: fix fulfillment spec (#6456)
This commit is contained in:
1 parent
76ff9e87b6
commit
43ed6a990d
1 file changed
+10
-5
+10
-5
@@ -13,7 +13,7 @@ import {
|
||||
UpdateServiceZoneDTO,
|
||||
} from "@medusajs/types"
|
||||
import { GeoZoneType } from "@medusajs/utils"
|
||||
import { moduleIntegrationTestRunner, SuiteOptions } from "medusa-test-utils"
|
||||
import { SuiteOptions, moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||
|
||||
jest.setTimeout(100000)
|
||||
|
||||
@@ -1004,19 +1004,24 @@ moduleIntegrationTestRunner({
|
||||
)
|
||||
|
||||
const updatedFulfillmentSets = await service.update(updateData)
|
||||
const fullfillmentSets = await service.list({
|
||||
id: updateData.map((ud) => ud.id),
|
||||
})
|
||||
|
||||
expect(updatedFulfillmentSets).toHaveLength(2)
|
||||
|
||||
let i = 0
|
||||
for (const data_ of updateData) {
|
||||
expect(updatedFulfillmentSets[i]).toEqual(
|
||||
const currentFullfillmentSet = fullfillmentSets.find(
|
||||
(fs) => fs.id === data_.id
|
||||
)
|
||||
|
||||
expect(currentFullfillmentSet).toEqual(
|
||||
expect.objectContaining({
|
||||
id: createdFulfillmentSets[i].id,
|
||||
id: data_.id,
|
||||
name: data_.name,
|
||||
type: data_.type,
|
||||
})
|
||||
)
|
||||
++i
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user