Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick Stevens 2WheelCoder

View GitHub Profile
View machine.js
const requestCheckout = () => Promise.resolve({ id: '12345',
webUrl: 'https://google.com'
})
const queryForShippingRates = () => Promise.resolve({
shippingRates: [{test: 'test'}]
})
const setShippingRate = () => Promise.resolve()
const checkoutMachine = Machine({
id: 'checkout',
View machine.js
const getCheckout = () => Promise.reject({
message: 'There was an error creating your order.',
errors: [{
message: "Zip is not valid for Canada",
code: "INVALID_FOR_COUNTRY",
field:["input","shippingAddress","zip"]
}],
})
const getShippingRates = () => {}
const setShippingRate = () => {}
You can’t perform that action at this time.