fix(medusa): migrate cart service to typescript (#884)

* fix: migrate cart service to typescript

* fix: jsdoc inventory service

* fix: revert route unit test change

* fix: typo

* fix: revert integration test packages

* fix: cleanup

* fix: tests

* fix: integration tests

* fix: create props type guards

* fix: move total field to common types
This commit is contained in:
Sebastian Rindom
2021-12-07 19:26:00 +01:00
committed by GitHub
parent 03ffab5d61
commit ed04132533
17 changed files with 509 additions and 208 deletions

View File

@@ -95,7 +95,7 @@ Object {
"payment_authorized_at": null,
"payment_id": null,
"region_id": "test-region",
"shipping_address_id": "test-shipping-address",
"shipping_address_id": StringMatching /\\^addr_\\*/,
"type": "swap",
"updated_at": Any<String>,
},
@@ -266,7 +266,7 @@ Object {
"payment_authorized_at": null,
"payment_id": null,
"region_id": "test-region",
"shipping_address_id": "test-shipping-address",
"shipping_address_id": StringMatching /\\^addr_\\*/,
"type": "swap",
"updated_at": Any<String>,
},

View File

@@ -137,6 +137,7 @@ describe("/store/carts", () => {
type: "swap",
created_at: expect.any(String),
updated_at: expect.any(String),
shipping_address_id: expect.stringMatching(/^addr_*/),
metadata: {
swap_id: expect.stringMatching(/^swap_*/),
},
@@ -220,6 +221,7 @@ describe("/store/carts", () => {
cart: {
id: expect.stringMatching(/^cart_*/),
billing_address_id: "test-billing-address",
shipping_address_id: expect.stringMatching(/^addr_*/),
type: "swap",
created_at: expect.any(String),
updated_at: expect.any(String),