File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
integration-tests/http/__tests__/product-option
packages/core/core-flows/src/product/steps Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ medusaIntegrationTestRunner({
162162 )
163163
164164 expect ( res . status ) . toEqual ( 200 )
165+ expect ( res . data . product_option . values . length ) . toEqual ( 3 )
165166 expect ( res . data . product_option ) . toEqual (
166167 expect . objectContaining ( {
167168 title : "option1" ,
@@ -188,6 +189,7 @@ medusaIntegrationTestRunner({
188189 )
189190 ) . data . product_option
190191
192+ expect ( option . values . length ) . toEqual ( 2 )
191193 expect ( option ) . toEqual (
192194 expect . objectContaining ( {
193195 title : "option2" ,
@@ -222,6 +224,7 @@ medusaIntegrationTestRunner({
222224 )
223225 ) . data . product_option
224226
227+ expect ( option . values . length ) . toEqual ( 2 )
225228 expect ( option ) . toEqual (
226229 expect . objectContaining ( {
227230 title : "option2" ,
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ export const processProductOptionsForImportStep = createStep(
3636 const processedProducts : UpdateProductWorkflowInputDTO [ ] = [ ]
3737
3838 for ( const product of data . products ) {
39- if ( product . options && product . options . length > 0 ) {
39+ if ( product . options ?. length ) {
4040 const createdOptions = await productService . createProductOptions (
4141 product . options
4242 )
You can’t perform that action at this time.
0 commit comments