Created
June 21, 2019 09:07
-
-
Save lgandecki/5628b6f15ddc4047fabc3fcb459a7d4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it("should be calculated with estimateShipping based on the price and weight", async () => { | |
const PRICE = 999; | |
const WEIGHT = 100; | |
const mocks = { Product: () => ({ price: PRICE, weight: WEIGHT }) }; | |
td.when(estimateShipping({ price: PRICE, weight: WEIGHT })).thenReturn(99); | |
const result = await executeGraphql({ | |
query, | |
service, | |
mocks | |
}); | |
expect(result.data._getProduct.shippingEstimate).toEqual(99); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment