import React from 'react';
import renderer from 'react-test-renderer';
import {useForm, FormContext} from 'react-hook-form';
import ShippingAddressForm from '../components/user_summary/shipping_address/ShippingAddressForm';
import Countries from './mock/Countries.json';
import States from './mock/States.json';
function FormWithContext() {
const formHelpers = useForm();
return (
console.log(o)}
setCurrentState={o => console.log(o)}
handleSubmit={e => console.log(e)}
currentCountry={Countries[1]}
currentState={{label: 'Idaho', value: 'io'}}
countries={Countries}
states={States}
/>
);
}
describe('ShippingAddressForm', () => {
test('matches snapshot', () => {
const component = renderer.create();
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
});