Skip to content
Snippets Groups Projects
Commit 2a208769 authored by Jack Hu's avatar Jack Hu
Browse files

bugfixes

parent 85326a38
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ const constants = { ...@@ -8,7 +8,7 @@ const constants = {
totalAmount: 8 totalAmount: 8
}, },
TEST_UPDATE: { TEST_UPDATE: {
id: "05843a96-1d34-43fb-88ca-0567e2f39ef6", id: "fc20c3d1-6879-4ed1-a21b-2990e597e7ad",
password: "test123" password: "test123"
}, },
...@@ -17,16 +17,18 @@ const constants = { ...@@ -17,16 +17,18 @@ const constants = {
email: "JamesWilliams@gmail.com", email: "JamesWilliams@gmail.com",
}, },
EXPECTED_PRODUCT: { EXPECTED_PRODUCT: {
id: "dc878081-060b-4a6c-9038-02069f1ecef8", categoryId: "44adf4f9-cdd3-49ba-9788-eaed531580de",
stock: 167, stock: 167,
price: 12, price: 12,
name: "Shoes",
description: "Shoes for sale", description: "Shoes for sale",
categoryId: "44adf4f9-cdd3-49ba-9788-eaed531580de" id: "dc878081-060b-4a6c-9038-02069f1ecef8",
name: "Shoes",
}, },
EXPECTED_ORDER: { EXPECTED_ORDER: {
userId: '99e865f3-316b-4d0c-ba8b-73acfe14083c',
id: "f38c26bf-8583-4e6f-88e9-0492490e47be", 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,
}, },
}; };
......
...@@ -9,7 +9,7 @@ const runTest: (func: () => any, expected?: any) => Promise<TestResult> = async ...@@ -9,7 +9,7 @@ const runTest: (func: () => any, expected?: any) => Promise<TestResult> = async
const end = performance.now(); const end = performance.now();
return { return {
ok: expected != null ? JSON.stringify(result) === JSON.stringify(expected) : true, ok: expected != null ? JSON.stringify(result) == JSON.stringify(expected) : true,
time: end - start time: end - start
}; };
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment