Skip to content

Instantly share code, notes, and snippets.

@lgandecki
Created June 20, 2019 18:00
Show Gist options
  • Save lgandecki/8683ef085dfa259915f2acbcf8d3d076 to your computer and use it in GitHub Desktop.
Save lgandecki/8683ef085dfa259915f2acbcf8d3d076 to your computer and use it in GitHub Desktop.
it("should be calculated as 1 dollar per 2 pounds for an item with a price of 1000 or below", async () => {
const mocks = { Product: () => ({ price: 999, weight: 100 }) };
const result = await executeGraphql({ query, service, mocks });
expect(result.data._getProduct.shippingEstimate).toEqual(50);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment