Skip to content
This repository was archived by the owner on Oct 20, 2023. It is now read-only.

Fix product JSON API endpoint #95

Merged
merged 1 commit into from
Apr 17, 2019
Merged

Conversation

antoinegrant
Copy link
Member

This PR supersede #92 in order to correct the issue in a timely manner.

getVariantFromId,
getVariantFromSerializedArray,
getVariantFromOptionArray
} from '../theme-product';
import productJson from '../__fixtures__/product.json';

describe("getProductJson()", () => {
test("get product by handle", () => {
fetchMock.mock("begin:/products/foo.js", productJson);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we need begin:/ here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed 👍

@antoinegrant antoinegrant force-pushed the theme-product-fix-endpoint branch from 59f891c to 5e71dae Compare April 17, 2019 18:47
@antoinegrant antoinegrant merged commit 6e9c9e4 into master Apr 17, 2019
@antoinegrant antoinegrant deleted the theme-product-fix-endpoint branch April 17, 2019 18:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants