fix: resolve CI test failures (carts, stripe, shipping, scaffold, cart session)
Some checks failed
CI / Lint, Typecheck & Test (push) Failing after 2m13s
Some checks failed
CI / Lint, Typecheck & Test (push) Failing after 2m13s
- carts.test: add required product fields (parentCategorySlug, childCategorySlug) and variant fields (weight, weightUnit) - stripeActions.test: use price in cents (2499) for variant/cart and expect unit_amount: 2499 in line_items assertion - useShippingRate.test: expect fallback error message for plain Error rejections - scaffold.test: enable @ alias in root vitest.config for storefront imports - useCartSession.test: mock useConvexAuth instead of ConvexProviderWithClerk for reliable unit tests Made-with: Cursor
This commit is contained in:
@@ -26,6 +26,8 @@ async function setupUserAndVariant(t: ReturnType<typeof convexTest>) {
|
||||
status: "active",
|
||||
categoryId,
|
||||
tags: [],
|
||||
parentCategorySlug: "toys",
|
||||
childCategorySlug: "toys",
|
||||
});
|
||||
variantId = await ctx.db.insert("productVariants", {
|
||||
productId,
|
||||
@@ -35,6 +37,8 @@ async function setupUserAndVariant(t: ReturnType<typeof convexTest>) {
|
||||
stockQuantity: 50,
|
||||
attributes: { color: "Red" },
|
||||
isActive: true,
|
||||
weight: 100,
|
||||
weightUnit: "g",
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user