diff --git a/src/constants.ts b/src/constants.ts index c662cb677bd9f09c87dc722011ef1ea77add850f..5d13316ce7c5bda4ef0bbda2548362dd4d893136 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -8,7 +8,7 @@ const constants = { totalAmount: 8 }, TEST_UPDATE: { - id: "05843a96-1d34-43fb-88ca-0567e2f39ef6", + id: "fc20c3d1-6879-4ed1-a21b-2990e597e7ad", password: "test123" }, @@ -17,16 +17,18 @@ const constants = { email: "JamesWilliams@gmail.com", }, EXPECTED_PRODUCT: { - id: "dc878081-060b-4a6c-9038-02069f1ecef8", + categoryId: "44adf4f9-cdd3-49ba-9788-eaed531580de", stock: 167, price: 12, - name: "Shoes", description: "Shoes for sale", - categoryId: "44adf4f9-cdd3-49ba-9788-eaed531580de" + id: "dc878081-060b-4a6c-9038-02069f1ecef8", + name: "Shoes", }, EXPECTED_ORDER: { + userId: '99e865f3-316b-4d0c-ba8b-73acfe14083c', id: "f38c26bf-8583-4e6f-88e9-0492490e47be", - products: [{ "productId": "d3e11810-8b5a-4468-a781-84109dd7569a", "quantity": 2 }] + products: [{ "productId": "d3e11810-8b5a-4468-a781-84109dd7569a", "quantity": 2 }], + totalAmount: 0, }, }; diff --git a/src/testing.ts b/src/testing.ts index 4971c74a78f3eed43ad2d5f15e46f1607b757ada..c1e66511bbcee81a215a9d27cd4543edf84a271d 100644 --- a/src/testing.ts +++ b/src/testing.ts @@ -9,7 +9,7 @@ const runTest: (func: () => any, expected?: any) => Promise<TestResult> = async const end = performance.now(); return { - ok: expected != null ? JSON.stringify(result) === JSON.stringify(expected) : true, + ok: expected != null ? JSON.stringify(result) == JSON.stringify(expected) : true, time: end - start }; }