Skip to content

Commit

Permalink
fix when-then
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermrbl committed Oct 2, 2024
1 parent 8d1d692 commit 77956ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ medusaIntegrationTestRunner({
)
})

it.only("should return prices with and without tax when the cart is available and a country is passed when listing products", async () => {
it("should return prices with and without tax when the cart is available and a country is passed when listing products", async () => {
const products = (
await api.get(
`/store/products?fields=id,*variants.calculated_price&cart_id=${euCart.id}&country_code=it`,
Expand Down Expand Up @@ -1645,7 +1645,7 @@ medusaIntegrationTestRunner({
).toEqual("40.9")
})

it.only("should return prices with and without tax when the cart context is available when listing products", async () => {
it("should return prices with and without tax when the cart context is available when listing products", async () => {
await api.post(
`/store/carts/${euCart.id}`,
{
Expand Down
4 changes: 2 additions & 2 deletions packages/core/core-flows/src/cart/workflows/create-carts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ export const createCartWorkflow = createWorkflow(
data.region?.countries.length === 1 && !data.input.shipping_address
)
}).then(() => {
// TODO: If I don't use the createStep function here, but instead a direct return statment e.g.:
// TODO: If I don't use the createStep function here, but instead use a direct return statement e.g.:
// return { country_code: data.region?.countries[0].iso_2 }
// The value of shippingAddress will be that return value regardless of the `when`.
// The value of shippingAddress will be that return value regardless wether the when condition is met or not
return createStep("assign-country-code", async (data: any) => {
return new StepResponse({
country_code: data.region?.countries[0].iso_2,
Expand Down

0 comments on commit 77956ae

Please sign in to comment.