Repository: medusajs/medusa
File: integration-tests/http/__tests__/promotions/admin/promotions.spec.ts (TypeScript)

Code before:

            await api.post(
              `/store/carts/${cart.id}`,
              {
                promo_codes: [],
              },
              storeHeaders
            )

            const cartWithoutPromotion = (
              await api.get(`/store/carts/${cart.id}`, storeHeaders)
            ).data.cart

            expect(cartWithoutPromotion).toEqual(
              expect.objectContaining({
                items: [
                  expect.objectContaining({
                    adjustments: [],
                  }),
                ],
                promotions: [],
              })
            )
          })

          it.only("should add an automatic promotion and after cart update, should delete the adjustment and create a new one for the automatic promotion", async () => {
            const publishableKey = await generatePublishableKey(appContainer)
            const storeHeaders = generateStoreHeaders({ publishableKey })

            const salesChannel = (
              await api.post(
                "/admin/sales-channels",
                { name: "Webshop", description: "channel" },
                adminHeaders
              )
            ).data.sales_channel

            const region = (
              await api.post(
                "/admin/regions",
                { name: "US", currency_code: "usd", countries: ["us"] },
                adminHeaders
              )
            ).data.region

            const product = (
              await api.post(
                "/admin/products",
                {
                  ...medusaTshirtProduct,
                  shipping_profile_id: shippingProfile.id,

Review comment (suggestion):
```suggestion
          it("should add an automatic promotion and after cart update, should delete the adjustment and create a new one for the automatic promotion", async () => {
```

Code after:

            await api.post(
              `/store/carts/${cart.id}`,
              {
                promo_codes: [],
              },
              storeHeaders
            )

            const cartWithoutPromotion = (
              await api.get(`/store/carts/${cart.id}`, storeHeaders)
            ).data.cart

            expect(cartWithoutPromotion).toEqual(
              expect.objectContaining({
                items: [
                  expect.objectContaining({
                    adjustments: [],
                  }),
                ],
                promotions: [],
              })
            )
          })

          it("should add an automatic promotion and after cart update, should delete the adjustment and create a new one for the automatic promotion", async () => {
            const publishableKey = await generatePublishableKey(appContainer)
            const storeHeaders = generateStoreHeaders({ publishableKey })

            const salesChannel = (
              await api.post(
                "/admin/sales-channels",
                { name: "Webshop", description: "channel" },
                adminHeaders
              )
            ).data.sales_channel

            const region = (
              await api.post(
                "/admin/regions",
                { name: "US", currency_code: "usd", countries: ["us"] },
                adminHeaders
              )
            ).data.region

            const product = (
              await api.post(
                "/admin/products",
                {
                  ...medusaTshirtProduct,
                  shipping_profile_id: shippingProfile.id,