MockShopifyTransportOpts
●cart · /shopify·interface
Options for . failOn lets test authors inject
transport-level failures on specific Shopify mutation operations so the
adapter's error-handling paths can be exercised without a live endpoint.
Properties
PROPTYPEDESCRIPTION
failOn?
Example
const transport = mockShopifyTransport({
failOn: (op) => op === 'cartLinesAdd' ? new Error('network error') : null,
});Related
ShopifyTransport createShopifyCartAdapter normalizeShopifyCart mockShopifyTransport
MetadataOpen in GitHub ↗
createShopifyCartAdapter
Builds a Shopifybacked CartAdapter over an injected transport. The adapter has no global side effects, no implicit tenant resolution — every call accepts ctx.sh
mockShopifyTransport
Builds an inmemory ShopifyTransport that responds with the same envelope shape the real Storefront API would produce. Lets cartcore's contract suite (and host i