integration tests passing

This commit is contained in:
olivermrbl
2021-09-05 21:34:13 +02:00
parent 13d539b882
commit 8fdfc87049
9 changed files with 94 additions and 60 deletions
@@ -96,7 +96,6 @@ describe("POST /admin/products", () => {
})
it("returns created product draft", () => {
console.log(subject.body)
expect(subject.body.product.id).toEqual(IdMap.getId("product1"))
})
@@ -327,10 +327,6 @@ export default async (req, res) => {
.withTransaction(manager)
.create({ ...value, profile_id: shippingProfile.id })
// console.log(variants)
// console.log(value)
// console.log(newProduct)
if (variants) {
for (const [i, variant] of variants.entries()) variant.rank = i
@@ -356,18 +352,13 @@ export default async (req, res) => {
}
})
// console.log("got to after variants")
const product = await productService.retrieve(newProduct.id, {
select: defaultFields,
relations: defaultRelations,
})
// console.log(product)
res.json({ product })
} catch (err) {
// console.log(err)
throw err
}
}